65,189
社区成员




class CUtility {
public:
static CString GetModulePath(HMODULE hModule = NULL);
}
CString CUtility::GetModulePath(HMODULE hModule /* = NULL */)
{
TCHAR buf[MAX_PATH] = {'\0'};
CString strDir, strTemp;
::GetModuleFileName( hModule, buf, MAX_PATH);
strTemp = buf;
strDir = strTemp.Left( strTemp.ReverseFind('\\') + 1 );
return strDir;
}