mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
Fixed: Compilation
--HG-- branch : develop
This commit is contained in:
parent
935a3dc5cc
commit
91a1f4e34b
1 changed files with 6 additions and 1 deletions
|
@ -56,7 +56,12 @@ std::string CLoginRegistry::getProductInstallId()
|
||||||
|
|
||||||
std::string id = NLMISC::toString(r);
|
std::string id = NLMISC::toString(r);
|
||||||
|
|
||||||
if (RegSetValueExW(hKey, InstallIdKeyHandle, 0L, REG_SZ, (const BYTE *) utf8ToWice(id), (DWORD)(id.size())+1) == ERROR_SUCCESS)
|
// copy wide string to a buffer
|
||||||
|
const uint keyMaxLength = 16;
|
||||||
|
wchar_t buffer[keyMaxLength];
|
||||||
|
wcscpy(buffer, utf8ToWide(id));
|
||||||
|
|
||||||
|
if (RegSetValueExW(hKey, InstallIdKeyHandle, 0L, REG_SZ, (const BYTE *) buffer, (DWORD)(wcslen(buffer)*2+2)) == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue