|
-
March 7th, 2003, 11:19 AM
#1
How do you use a "C" dll from within a C# app?
Does anyone know how I can use a dll written in "C" from within a C# application? I have gotten as far as building a C# app and then importing the dll. However, when I call the function, I get an error saying that the dll cannot be loaded.:
// sample code follows
[DllImport("MyDll.dll")]
public static extern int DllFunction();
:
:
public static int Main()
{
DllFunction(); // I get a message that the dll cannot be loaded
}
Thanks for any help (and sample code)!!
-Tom
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
|