DLL path+filename

Started by
2 comments, last by kusma 18 years, 10 months ago
How to get DLLs' path & filename? I'm having exe. And I'm loading a dll in it (like plugins). How to get dll's pathname from dll? I just know how to get filename: GetModuleFileName().
Advertisement
GetModuleFileName() should give you the entire path and file name.
It might return a path relative the current directory, use GetCurrentDirectory() in that case.
GetModuleFileName() returns a fully qualified path - it should be valid from anywhere without worrying about relative directories.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

GetModuleFilename() SHOULD give you the path to the module, not just the filename. perhaps the path is relative to the current dir? in that case, _splitpath, _makepath and GetCurrentDirectory might be your friend?

edit: sorry about the repetition, i kinda cheked out the post and went for lunch ;)

This topic is closed to new replies.

Advertisement