ANSI与UNICODE
#ifdef _UNICODE
wstring CPATH::GetExeName()
{
wchar_t ExePath[MAX_PATH];
GetModuleFileNameA(NULL,ExePath,sizeof(ExePath));
return ExePath;
}
#else
string CPATH::GetExeName()
{
char ExePath[MAX_PATH];
GetModuleFileNameA(NULL,ExePath,sizeof(ExePath));
return ExePath;
}
#endif
#ifdef _UNICODE
wstring CPATH::GetExeName()
{
wchar_t ExePath[MAX_PATH];
GetModuleFileNameW(NULL,ExePath,sizeof(ExePath));
return ExePath;
}
#else
string CPATH::GetExeName()
{
char ExePath[MAX_PATH];
GetModuleFileNameA(NULL,ExePath,sizeof(ExePath));
return ExePath;
}
#endif