有的时候,当前执行的DLL 和启动的EXE 所在路径并不一致,这时我们想要获得当前执行DLL 所在路径可以使用下面的方法. // Summary: // Gets the path or UNC location of the loaded file that contains the manifest. // // Returns: // The location of the loaded file that contains the manifest. If the loaded file
一般地,获取当前模块路径都是通过调用 GetModuleFileName() 来获取的. DWORD WINAPI GetModuleFileName( __in HMODULE hModule, __out LPTSTR lpFilename, __in DWORD nSize ); 参数 hModule A handle to the loaded module whose path is being requested. If this parameter is NULL, GetModu