|
-
March 12th, 2002, 02:49 AM
#1
How to call DLL compiled by VC 6.0 by C#?
I have a DLL which was compiled with VC 6.0.
Can I call that DLL with C#?
Thanks!
-
March 12th, 2002, 02:56 AM
#2
Re: How to call DLL compiled by VC 6.0 by C#?
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?
-
July 2nd, 2003, 11:48 AM
#3
Importing c++ data types
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!
I am scifi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|