DLL path+filename
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().
GetModuleFileName() should give you the entire path and file name.
It might return a path relative the current directory, use GetCurrentDirectory() in that case.
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.
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 ;)
edit: sorry about the repetition, i kinda cheked out the post and went for lunch ;)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement