Hello,
I have a function in a native DLL declared as follows:
__declspec(dllexport) int Start( char* Key );
And the declaration in my C# class is as follows:
[DllImport("SockSp10.dll")]
public static extern int Start([MarshalAs(UnmanagedType.LPStr)] string Key);
Yet when I call the function from my C# class, I receive, "Unable to find an
entry point named Start in DLL XXXX"
Does this error message indicate a problem with the calling convention? the
parameter list? the return type?
I am able to use this DLL with no problems from an MFC application, so I
know the functions are being exported correctly.
Thank you for any pointers,
Rich
Mattias Sj?gren - 14 Sep 2004 08:41 GMT
>Does this error message indicate a problem with the calling convention? the
>parameter list? the return type?
It probably means the function is exported with a mangled name. You
can run Dumpbin.exe /exports to see with what name it's exported.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.