Click here to Skip to main content
15,911,646 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Sizeof out of scope? Pin
Xpnctoc10-May-10 5:47
Xpnctoc10-May-10 5:47 
GeneralRe: Sizeof out of scope? Pin
Richard MacCutchan10-May-10 6:13
mveRichard MacCutchan10-May-10 6:13 
QuestionIncorporating a jpg image in .exe file Pin
Invinci5-May-10 1:31
Invinci5-May-10 1:31 
AnswerRe: Incorporating a jpg image in .exe file Pin
Andreoli Carlo5-May-10 5:04
professionalAndreoli Carlo5-May-10 5:04 
QuestionBasic memory management problem Pin
randomVariable30-Apr-10 4:31
randomVariable30-Apr-10 4:31 
QuestionMessage Removed Pin
29-Apr-10 23:56
arun_pk29-Apr-10 23:56 
AnswerRe: List View Column delete Pin
Andreoli Carlo30-Apr-10 4:34
professionalAndreoli Carlo30-Apr-10 4:34 
QuestionProblems creating Native C++ object from within C++/CLI [modified] Pin
smea29-Apr-10 8:56
smea29-Apr-10 8:56 
This is driving me up the wall so I hope someone can help

I have an existing Native C++ DLL created in visual studio 2008.

I want to use some of the class's and the functionality that they provide from within a C++/CLI project (wrapper DLL) which in turn can be used from other .NET applications so in affect I will have a .NET application which references a C++/CLI dll which in turn references a native C++ dll

I can create each of the components as separate protects within a single VS2008 solution file and everything builds without error.

The .NET application runs without error and is able to instantiate the C++/CLI object that I have without error. The problem occurs when I call a method on the C++/CLI object which in turn instantiates a native class. I can debug the code right to the point where:

C++
NativeObject no = new NativeObject();


is called at which point I get a 'System.Runtime.InteropServices.SEHException' occurred in .dll' Confused | :confused: Confused | :confused:

The native code works fine used within other native projects the problems only occur in this .NET environment.

For reference I'm exporting class definitions from the native DLL using this at the top of the .h file

C++
#ifdef EXPORT_IMS_CORE_CLASS
    #define IMS_CORE_CLASS_API __declspec( dllexport )
#else
    #define IMS_CORE_CLASS_API __declspec( dllimport )
    #pragma message( "Automatic link to IMSCore.lib (IMS::DataTypes::DataObject)" )
    #pragma comment( lib, "IMSCore.lib" )
#endif


I can supply a cut down solution where the error occurs if any one wants to have a look

Thanks in advance for any help, Simon

modified on Wednesday, May 5, 2010 9:17 AM

AnswerRe: Problems creating Native C++ object from within C++/CLI Pin
Michel Godfroid30-Apr-10 0:14
Michel Godfroid30-Apr-10 0:14 
GeneralRe: Problems creating Native C++ object from within C++/CLI Pin
smea5-May-10 3:21
smea5-May-10 3:21 
AnswerRe: Problems creating Native C++ object from within C++/CLI Pin
Michel Godfroid5-May-10 3:23
Michel Godfroid5-May-10 3:23 
Questionrun , show and application in my project and handle its forms Pin
iman_kh28-Apr-10 3:45
iman_kh28-Apr-10 3:45 
AnswerRe: run , show and application in my project and handle its forms Pin
Xeqtr28-Apr-10 7:14
Xeqtr28-Apr-10 7:14 
QuestionDynamic label text? Pin
Lucidation26-Apr-10 9:52
Lucidation26-Apr-10 9:52 
AnswerRe: Dynamic label text? Pin
Richard MacCutchan26-Apr-10 11:38
mveRichard MacCutchan26-Apr-10 11:38 
QuestionHow to calculate MPEG1/2 Video RTP Packet Timestamp field Pin
vijaysinh.vansadia22-Apr-10 22:57
vijaysinh.vansadia22-Apr-10 22:57 
QuestionBinaryWriter writes empty file Pin
KlaasVersteeg20-Apr-10 21:43
KlaasVersteeg20-Apr-10 21:43 
AnswerRe: BinaryWriter writes empty file Pin
KlaasVersteeg20-Apr-10 21:46
KlaasVersteeg20-Apr-10 21:46 
AnswerRe: BinaryWriter writes empty file Pin
Richard MacCutchan21-Apr-10 1:41
mveRichard MacCutchan21-Apr-10 1:41 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 2:18
KlaasVersteeg21-Apr-10 2:18 
GeneralRe: BinaryWriter writes empty file Pin
Richard MacCutchan21-Apr-10 4:06
mveRichard MacCutchan21-Apr-10 4:06 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 4:26
KlaasVersteeg21-Apr-10 4:26 
AnswerRe: BinaryWriter writes empty file Pin
Luc Pattyn21-Apr-10 6:04
sitebuilderLuc Pattyn21-Apr-10 6:04 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 20:01
KlaasVersteeg21-Apr-10 20:01 
GeneralRe: BinaryWriter writes empty file Pin
Richard MacCutchan21-Apr-10 21:13
mveRichard MacCutchan21-Apr-10 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.