|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dynamically import fusion.dllI'd like to dynamically import methods from the fusion library (fusion.dll).
However, if I just do a straight [DllImport(blah)], I can't guarantee that I get the .Net 2 runtime version. I've found that the unmanaged method LoadLibraryShim in mscoree.dll will return a module handle to the latest runtime version, the thing I can't figure out is how to then use this handle to invoke methods on the library from C#. Any hints gratefully received! Will,
>I'd like to dynamically import methods from the fusion library (fusion.dll). Since fusion.dll is used by the CLR itself you should get the "right">However, if I just do a straight [DllImport(blah)], I can't guarantee that I >get the .Net 2 runtime version. version corresponding to the CLR version you've loaded if you simply use DllImport("fusion.dll"). That is, if you make sure your app runs under the v2.0 CLR you should get the desired DLL version. Isn't that what you want? Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. |
|||||||||||||||||||||||