Software Development Network>> Visual C++>> Module handle in C++/CLI library
Hi,
I think that code should looke like this:
IntPtr ptr=Marshal::GetHINSTANCE(Assembly::GetAssembly(
There are some other methods in the Assembly class that allow you to get the same result without using name, like for instance:
Assembly::GetAssembly(
Max
Thanks, using Type class is much better, doesn't require module name:
Module^ module = this->GetType()->Module;
Module handle in C++/CLI library
Arild Fines
Hi,
I think that code should looke like this:
IntPtr ptr=Marshal::GetHINSTANCE(Assembly::GetAssembly(
this->GetType())->GetModule("MyDll.dll"));There are some other methods in the Assembly class that allow you to get the same result without using name, like for instance:
Assembly::GetAssembly(
this->GetType())->GetModules()[0]Max
DennisV
Thanks, using Type class is much better, doesn't require module name:
Module^ module = this->GetType()->Module;