The GetModuleFileName function retrieves the full path and filename for the executable file containing the specified module.
1.GetCurrentDirectory The GetCurrentDirectory function retrieves the current directory for the current process. DWORD GetCurrentDirectory( DWORD nBufferLength, LPTSTR lpBuffer ); 2.GetModuleFileNameThe GetModuleFileName function retrieves the fully qualified path for the specified module.To specify the process that contains the module, use the GetModuleFileNameEx function. DWORD GetModuleFileName( HMODULE hModule, LPTSTR lpFilename, DWORD nSize );
The GetCurrentDirectory function retrieves the current directory for the current process.
DWORD GetCurrentDirectory(
DWORD nBufferLength,
LPTSTR lpBuffer
);
2.GetModuleFileNameThe GetModuleFileName function retrieves the fully qualified path for the specified module.To specify the process that contains the module, use the GetModuleFileNameEx function.
DWORD GetModuleFileName(
HMODULE hModule,
LPTSTR lpFilename,
DWORD nSize
);
GetCurrentDirectory(MAX_PATH,condir);