Visar inlägg med etikett windows. Visa alla inlägg
Visar inlägg med etikett windows. Visa alla inlägg

28 oktober 2010

VMWare Tools upgrading

After upgrading VMWare tools on a windows guest, run this:

set devmgr_show_nonpresent_devices=1
devmgmt.msc

then uninstall all devices that arent used any more.

27 april 2009

Read windows registry in c++

DWORD readReg(HKEY myKey, char* path, char* value) {
struct HKEY__* reghandle;
DWORD readValue;
DWORD size = 8192;
if (RegOpenKeyEx(myKey,path,0,KEY_READ,&reghandle) != ERROR_SUCCESS)
{
printf("Couldn't read key.");
}
DWORD ret;
ret = RegQueryValueEx(reghandle, value, NULL, NULL, (LPBYTE)&readValue, &size);
if (ret != ERROR_SUCCESS)
{
printf("Couldn't get value.");
}
RegCloseKey(reghandle);
return readValue;
}