-1
我的代碼:WINAPI unicode的問題
wchar_t* temp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 1000 * sizeof(wchar_t));
wchar_t* temp2 = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 1000 * sizeof(wchar_t));
GetTempPathW(1000, temp);
GetTempFileNameW(temp, L"vdr", GetCurrentProcessId(), temp2);
HeapFree(GetProcessHeap(), 0, temp2);
MessageBoxW(0,temp2,0,0);
應該做一個文件 「vdrXXXX.tmp」 與XXXX是PROCESSS ID。但它會返回奇怪的東西。就像unicode符號,然後是路徑的一部分。我做錯了什麼?
對我感到羞恥。抱歉。 :) – blez