Hi there!!!
I've got the following routine in my dll
_declspec(dllexport) int InitializeGlobal();
and I want to use it in my C# project.
In C# I write
[DllImport("c:\\MyDll.dll", EntryPoint
= "InitializeGlobal", CallingConvention =
CallingConvention.Cdecl)]
public static extern int InitializeGlobal();
I've watched with dumpbin, the dll is exporting this func.
So why I cannot call it, I receive DLLNotFound exception...
However the paths are ok
Vadym Stetsyak - 04 Aug 2003 11:15 GMT
the problem was solved...
Another question - if I use a routine from the dll then it
is loaded to my process and unloads only when application
is closed or when the routine return control?
>-----Original Message-----
>Hi there!!!
[quoted text clipped - 16 lines]
>
>.
Mattias Sj?gren - 04 Aug 2003 12:26 GMT
>Another question - if I use a routine from the dll then it
>is loaded to my process and unloads only when application
>is closed or when the routine return control?
When the app is closed, unless you explicitly call the FreeLibrary
Win32 API.
Mattias

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