B
BDowling
Hi all,
I have an existing Visual C++ project that builds a DLL (not COM or
ATL or anything). I wish to use this DLL in a Visual Studio 2005 C#
project without having to define each function and structure again in
the C# project (using pinvoke I believe).
I've done some reading around and it seems that what I'm after is
possible. I've added the old C++ project to my new C# solution and set
the compiler to use /clr. I can then add the DLL as a reference to the
C# project without any errors. However, I'm stuck there. How do I
actually invoke any of the methods in the DLL? Adding "using <DLL
name>" produces an error, and I'm not sure what else to try.
Thanks in advance,
Ben
I have an existing Visual C++ project that builds a DLL (not COM or
ATL or anything). I wish to use this DLL in a Visual Studio 2005 C#
project without having to define each function and structure again in
the C# project (using pinvoke I believe).
I've done some reading around and it seems that what I'm after is
possible. I've added the old C++ project to my new C# solution and set
the compiler to use /clr. I can then add the DLL as a reference to the
C# project without any errors. However, I'm stuck there. How do I
actually invoke any of the methods in the DLL? Adding "using <DLL
name>" produces an error, and I'm not sure what else to try.
Thanks in advance,
Ben