Getting the installation directory of a dll at run time throgh its code

I'm creating a dll. This dll is a in process server which runs inside the internet explorer. I want to get the installation directory of this dll at runtime through the code. Because of this dll runs in IE if I get the current directory is it gives the directory of IE or this dll.

Thanks,
Supun.



Answer this question

Getting the installation directory of a dll at run time throgh its code

  • D. Choquette

    Have you tried GetModuleFileName with first parameter equal to the handle of your DLL, which is passed to DllMain function of your DLL
  • Larry Charlton

    Did you use GetModuleFileName() for that

  • Getting the installation directory of a dll at run time throgh its code