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

Managed C++/CLI

 
GeneralRe: Convert to datetime problem Pin
wael_r4-Jun-09 23:01
wael_r4-Jun-09 23:01 
QuestionUsing a DLL containing MFC functions in a Managed C++ app (Help please) [modified] Pin
James19762-Jun-09 21:42
James19762-Jun-09 21:42 
QuestionRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
Mark Salsbery3-Jun-09 11:51
Mark Salsbery3-Jun-09 11:51 
AnswerRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
James19763-Jun-09 23:08
James19763-Jun-09 23:08 
GeneralRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
led mike4-Jun-09 4:28
led mike4-Jun-09 4:28 
GeneralRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
Mark Salsbery4-Jun-09 4:52
Mark Salsbery4-Jun-09 4:52 
GeneralRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
led mike4-Jun-09 7:30
led mike4-Jun-09 7:30 
GeneralRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
James19764-Jun-09 5:01
James19764-Jun-09 5:01 
Hi Mike, thanks for your reply.

led mike wrote:
Then you create your own function that you can export and it calls the MFC function.

Even if i add my own function there will still be a compilation error due to the base-class function. I dont think this will work as the base-class function is still directly called by base-class code (that is, the GetThisClass() function is called by the IMPLEMENT_DYNAMIC macro in MFC). I cannot modify MFC to call my own newly added function.


led mike wrote:
That is not true. We use a DLL that I authored that is a mixed mode DLL that exports a native C++ class. That class is used in a native Win32 application. The native classes you export cannot use any managed types as parameters because then they would not be a native interface. However they can use managed objects in the implementation

When i tried to place the "declspec(export)" declaration in front of any class that contains managed C++, it generated a compiler error. I wonder why it worked okay for you, perhaps i dont have something correct in my code? I'll double-check this, thanks.


led mike wrote:
See here[^]

Thanks for your link. I have already tried most of these, including using a .def file (which seemed to accept the .def file but still displayed the linkage errors) and using the declspec(export) for the class as mentioned above.

I have a small sample project that i could email to demonstrate, if yourself or anyone else wouldnt mind taking a look? Any help would be greatly appreciated.

Thanks,
James
GeneralRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
led mike4-Jun-09 5:17
led mike4-Jun-09 5:17 
GeneralRe: Using a DLL containing MFC functions in a Managed C++ app (Help please) Pin
James19764-Jun-09 5:21
James19764-Jun-09 5:21 
QuestionDRMInitEnvironment function fails............... :( Pin
deadlyabbas1-Jun-09 21:31
deadlyabbas1-Jun-09 21:31 
QuestionHow to return a multidimensional array with a pointer function in Visual C++? Pin
emira671-Jun-09 4:40
emira671-Jun-09 4:40 
QuestionReturning a multidimensional array from pointer function in Visual C++ Pin
emira671-Jun-09 4:00
emira671-Jun-09 4:00 
QuestionLNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700730-May-09 21:15
jobin00700730-May-09 21:15 
AnswerRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery31-May-09 9:37
Mark Salsbery31-May-09 9:37 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 10:18
jobin00700731-May-09 10:18 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error [modified] Pin
Mark Salsbery31-May-09 10:40
Mark Salsbery31-May-09 10:40 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 10:48
jobin00700731-May-09 10:48 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery31-May-09 10:53
Mark Salsbery31-May-09 10:53 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 11:00
jobin00700731-May-09 11:00 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery31-May-09 11:08
Mark Salsbery31-May-09 11:08 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
jobin00700731-May-09 12:07
jobin00700731-May-09 12:07 
GeneralRe: LNK2005 Redefinition Error on using CLI --already defined LNK2005 error Pin
Mark Salsbery1-Jun-09 7:09
Mark Salsbery1-Jun-09 7:09 
AnswerAttempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) Help! Pin
jobin0070071-Jun-09 12:37
jobin0070071-Jun-09 12:37 
GeneralRe: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019) Help! Pin
Mark Salsbery1-Jun-09 12:42
Mark Salsbery1-Jun-09 12:42 

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.