F
Frits JK
Hallo,
I have to write a GUID to the register but I don't know to convert to
hexadecimal.
I have tried several things but I am shore that line 5 and 6 are not
correct.
//--------------------------------------------------------------------------
----------
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\MSMQ\\SimpleClient\\" , 0, NULL, 0, 0, NULL, &hKey,
&disp)== ERROR_SUCCESS)
{
GUID pguid ; // 2
CSTUtil su; // 3
su.CoCreateGuid( &pguid); // 4
char Myguid[50]; // 5 ??
sprintf( Myguid, "%#8x%#4x%#4x%s", pguid.Data1, pguid.Data2,
pguid.Data3, pguid.Data4 ); // 6 ??
RegSetValueEx(hKey, L"fjkGUID", 0, REG_BINARY , (BYTE*)Myguid, 16 );
// 7
}
//--------------------------------------------------------------------------
I have to write a GUID to the register but I don't know to convert to
hexadecimal.
I have tried several things but I am shore that line 5 and 6 are not
correct.
//--------------------------------------------------------------------------
----------
if (RegCreateKeyEx(HKEY_LOCAL_MACHINE,
L"SOFTWARE\\Microsoft\\MSMQ\\SimpleClient\\" , 0, NULL, 0, 0, NULL, &hKey,
&disp)== ERROR_SUCCESS)
{
GUID pguid ; // 2
CSTUtil su; // 3
su.CoCreateGuid( &pguid); // 4
char Myguid[50]; // 5 ??
sprintf( Myguid, "%#8x%#4x%#4x%s", pguid.Data1, pguid.Data2,
pguid.Data3, pguid.Data4 ); // 6 ??
RegSetValueEx(hKey, L"fjkGUID", 0, REG_BINARY , (BYTE*)Myguid, 16 );
// 7
}
//--------------------------------------------------------------------------