I wrestled with this one for awhile, but discovered (via Google) that you can use StringBuilder to allocate a fixed-length string, then pass the StringBuilder in by value to the exported function/method in the unmanaged DLL. Strings don't work in this case because they are not fixed length, and access violation errors can (and usually) occur.
Declare Ansi Function Function_Name Lib "lib.dll" (ByVal strGoingIn As String, ByVal strComingOut As StringBuilder) As Integer
Showing posts with label DLL. Show all posts
Showing posts with label DLL. Show all posts
Friday, June 29, 2007
Viewing exports for a DLL
Open a Visual Studio Command Prompt, navigate to the directory of the DLL to inspect, and use the following command:
dumpbin /export whatever.dll
dumpbin /export whatever.dll
Subscribe to:
Posts (Atom)