LoadLibrary

  • Thread starter Thread starter devgrt
  • Start date Start date
D

devgrt

C#.Net PocketPC 2003:
I use an eVC DLL in my project. For some reason I can call funcs from it
fine from the first form, but later in the program (after loading another
third-party dll we use) I get missingmethodexception. If I commnet out the
use of the third-party stuf fthen it works.
Is there a way to preload my dll (I was thinking LoadLibrary but that is
not available for C#.Net???).

Thank you
 
Do the dlls have the same name but expose different functionality? e.g.

\Windows\mylib.dll versus \Program Files\MyApp\mylib.dll

Peter
 
I checked... the dll is only in the applciation's dir.

I was able to use LoadLibrary afterall by just using it from coredll.dll:

[DllImport( "coredll.dll")]
private static extern IntPtr LoadLibrary( string fileName );

//use LoadLibrary to load my dll:
string fdll =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName)+ @"\mydll.dll";IntPtr h = LoadLibrary(fdll);//ensure it loaded OKif( h == IntPtr.Zero ){ MessageBox.Show("DLL Load Failure!"); //... if it did not laod do something here}"Peter Foot [MVP]" <[email protected]> wrote in messagenews:%[email protected]...> Do the dlls have the same name but expose different functionality? e.g.>> \Windows\mylib.dll versus \Program Files\MyApp\mylib.dll>> Peter>> --> Peter Foot> Windows Embedded MVP> http://www.inthehand.com | http://www.peterfoot.net>> "devgrt" <[email protected]> wrote in messageC#.Net PocketPC 2003:>> I use an eVC DLL in my project. For some reason I can call funcs from itfine from the first form, but later in the program (after loading anotherthird-party dll we use) I get missingmethodexception. If I commnet out theuse of the third-party stuf fthen it works.>> Is there a way to preload my dll (I was thinking LoadLibrary but that isnot available for C#.Net???).>>>> Thank you>>>>
 
Back
Top