以下が0バイトのファイルを作成している理由を誰かがアドバイスできますか? そして、これを修正するソリューションは? 私はVC ++にかなり慣れていません。
SE_BACKUP_NAME 権限は、他のコードで先に取得されます。- テスト済みで、正常に動作します。
ありがとうございました。
//save_loc3 = "c:\InstalogRegBackup\backup_20126141314\hklm_hardware.bak"
long resultC1 = ::RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"HARDWARE", 0, KEY_READ, &hKey);
std::cout << "Value of GetLastError() is: " << GetLastError() << endl; // "0" is output to screen!
std::wcout << "Value of resultC1 is: " << resultC1 << endl; // "0" is output to screen.
long resultC2 = ::RegSaveKeyW(hKey, save_loc3, NULL); //no errors on this line
std::cout << "Value of GetLastError() is: " << GetLastError() << endl; // "0" is output to screen!
std::wcout << "Value of resultC2 is: " << resultC2 << endl; // "1314" is output to screen! (a required priviledge is not held by the client) also saved file is 0 Bytes?!