ofritha
asked on
File path
Hello all,
How do I get the absolute path to the current library?
I want to get the absolute path add it to the file I want to use.
Thanks,
ofrit
How do I get the absolute path to the current library?
I want to get the absolute path add it to the file I want to use.
Thanks,
ofrit
Use ::GetModuleFileName(), and then cut off filename itself - you get the path
You mean Win32 dll module?
// Dll or application filename
char FileName[256];
GetModuleFileName( Handle, FileName, sizeof(FileName) - 1);
// Dll or application filename
char FileName[256];
GetModuleFileName( Handle, FileName, sizeof(FileName) - 1);
ASKER
Thanks iRBIs for your reply,
I did not understand how to use this method. In case my dll's name is LptDLL.dll how do I get its full path to use in the method LoadLibrary.
Thanks,
o
I did not understand how to use this method. In case my dll's name is LptDLL.dll how do I get its full path to use in the method LoadLibrary.
Thanks,
o
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help.
Ofrit
Ofrit