0
wstringを追加しています。私はwstringで "C:\ Windows"を持っています。そして私はそれに "\ system32 \ config \"を追加しています。コードに従ってGetWindowsDirectoryを呼び出すときにwstringを追加している間に、WindowsのExeがクラッシュする
#define MAX_PATH 260
wstring wstrWindowsDirectory;
if(0 != GetWindowsDirectory((LPWSTR)wstrWindowsDirectory.c_str(),MAX_PATH))
{
if(!wstrWindowsDirectory.empty()) {
wstrWindowsDirectory += L"\System32\\config\\";
}
}
But its crashing..
please help me..
Thanks in advance.
'wstring'は' const char * '配列なので、手作業で十分な長さを割り当てる必要があります。 – Dia