Click here to Skip to main content
16,006,475 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionNative classes in managed assemblies Pin
Xpnctoc17-Aug-06 15:38
Xpnctoc17-Aug-06 15:38 
AnswerRe: Native classes in managed assemblies Pin
Nish Nishant17-Aug-06 15:47
sitebuilderNish Nishant17-Aug-06 15:47 
GeneralRe: Native classes in managed assemblies [modified] Pin
Xpnctoc17-Aug-06 16:22
Xpnctoc17-Aug-06 16:22 
GeneralRe: Native classes in managed assemblies [modified] Pin
Nish Nishant18-Aug-06 1:48
sitebuilderNish Nishant18-Aug-06 1:48 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 4:58
Xpnctoc18-Aug-06 4:58 
GeneralRe: Native classes in managed assemblies Pin
led mike18-Aug-06 7:23
led mike18-Aug-06 7:23 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 8:26
Xpnctoc18-Aug-06 8:26 
GeneralRe: Native classes in managed assemblies Pin
Nish Nishant18-Aug-06 7:43
sitebuilderNish Nishant18-Aug-06 7:43 
Xpnctoc wrote:
OK. I Started a solution from scratch, but I am still faced with the same issues. I think I can simplify the question, though:

Simply put, how do I import a native class from a mixed-mode DLL into a mixed-mode app? I can import a managed class easily from a /clr DLL. I can import a native class from a Win32 DLL easily. But I can't import a native class from a /clr DLL.


I created a test DLL and a test EXE. I export a class from the DLL and use that class in the EXE. Both DLL and EXE are compiled with /clr and it works as expected.

Perhaps you have forgotten to add the export lib to the EXE project?
You can use the following line directly in your cpp file :-

#pragma comment(lib, "Path to DLL/DllName.lib")

Regards,
Nish
Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
Currently working on C++/CLI in Action for Manning Publications.
Also visit the Ultimate Toolbox blog (New)

GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 9:01
Xpnctoc18-Aug-06 9:01 
GeneralRe: Native classes in managed assemblies Pin
Nish Nishant18-Aug-06 9:04
sitebuilderNish Nishant18-Aug-06 9:04 
GeneralRe: Native classes in managed assemblies Pin
Xpnctoc18-Aug-06 9:20
Xpnctoc18-Aug-06 9:20 
Questionmsgbox, quick questio Pin
Droze17-Aug-06 10:57
Droze17-Aug-06 10:57 
AnswerRe: msgbox, quick questio Pin
Christian Graus17-Aug-06 18:01
protectorChristian Graus17-Aug-06 18:01 
GeneralRe: msgbox, quick questio Pin
Nish Nishant18-Aug-06 1:51
sitebuilderNish Nishant18-Aug-06 1:51 
GeneralRe: msgbox, quick questio Pin
Droze18-Aug-06 4:18
Droze18-Aug-06 4:18 
GeneralRe: msgbox, quick questio Pin
Christian Graus18-Aug-06 11:41
protectorChristian Graus18-Aug-06 11:41 
GeneralRe: msgbox, quick questio Pin
Nish Nishant18-Aug-06 11:44
sitebuilderNish Nishant18-Aug-06 11:44 
GeneralRe: msgbox, quick questio [modified] Pin
Christian Graus18-Aug-06 12:14
protectorChristian Graus18-Aug-06 12:14 
Questionproblems with "new" Pin
Wheatbread17-Aug-06 8:42
Wheatbread17-Aug-06 8:42 
AnswerRe: problems with "new" Pin
led mike17-Aug-06 8:47
led mike17-Aug-06 8:47 
AnswerRe: To know whether a file is saved or not Pin
led mike17-Aug-06 8:48
led mike17-Aug-06 8:48 
QuestionWinMain ambiguity Error Pin
guestcat17-Aug-06 0:40
guestcat17-Aug-06 0:40 
QuestionLibjingle and GIPS Pin
Rahul.RK16-Aug-06 21:45
Rahul.RK16-Aug-06 21:45 
Questioncalls to unmanaged dll to create a socket result in debug assertion Pin
moniqui16-Aug-06 8:52
moniqui16-Aug-06 8:52 
AnswerRe: calls to unmanaged dll to create a socket result in debug assertion Pin
led mike16-Aug-06 8:59
led mike16-Aug-06 8:59 

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.