I have a DLL which was compiled with VC 6.0.
Can I call that DLL with C#?
Thanks!
Printable View
I have a DLL which was compiled with VC 6.0.
Can I call that DLL with C#?
Thanks!
You must include in your project System.Runtime.InteropServices.
Sample:
[DllImport("yourDll")]
public static extern int Function(int hWnd,....)
public static int Main()
{
Function(10);
}
Can you retrieve on MSDM documentation about Platform Invoke.
Good luck
Please rate if you think this response was useful for you.
Have more questions?
Hi all. I am trying to import a c++ dll, but the compiler doesn't understand the user defined c++ data types being passed into and returned from the c++ function. How do I import user defined c++ data types?
for example:
[DllImport("myvsdll.dll")]
static extern USERTYPE* process(USERDATA* udata);
compiler says USERTYPE and USERDATA can not be found.
Thanks!