I have interop assembly from I wolud like to get path to orginal COM dll. How this can be done?
Edit:
Here is similar question with post marked as answer but it is so brief that I still don't know what to do.
I have created object from interop dll and used GetModuleHandle( "mycomserver.dll" ) and 0 results returned.
Code looks like that:
class Program
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern IntPtr GetModuleHandle(string libname);
static void Main(string[] args)
{
IntPtr result = GetModuleHandle(typeof(InteropClass).Module.Name);
Console.WriteLine(result);
}
}
Regards, jotbek