full pathname of loaded dll

Is it possible to determine the full pathname of a dll from the dll itself when it is loaded?
pswannAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
vinniewConnect With a Mentor Commented:
I'm sure it is.

Look at the documentation for GetModuleFileName().

Also, you can look at listdlls.exe from www.ntinternals.com for how to get that from outside the process. (look at the exports).


0
 
pswannAuthor Commented:
We were using GetModulefilename() but unfortunately we were passing the wrong HMODULE (dllname.hmodule) rather than a call to GetModuleHandle().

An example of its use and where we can get a valid HMODULE from would have been useful.
0
All Courses

From novice to tech pro — start learning today.