PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Registry Key for Smartphone Owner Name ??

I can't seem to find the Owner Name registry key on the Smartphone. It, obviously, is different from the PocketPC. Does anyone know where it might be lurking?
rcp wrote:I can't seem to find the Owner Name registry key on the Smartphone. It, obviously, is different from the PocketPC. Does anyone know where it might be lurking?


yep, it's in the same place, but use "Name" instead of "Owner" as a key
hmmm, that still doesn't seem to work. here is what i am doing.

Code:


#ifdef SP
result = RegOpenKeyEx(HKEY_CURRENT_USER, _T("\\ControlPanel\\Name"), 0, 0, &hkPerUser);
#else
result = RegOpenKeyEx(HKEY_CURRENT_USER, _T("\\ControlPanel\\Owner"), 0, 0, &hkPerUser);
#endif

if (ERROR_SUCCESS != result)
{
return FALSE;
}


cbData = 0x300;
WCHAR *owner = NEW WCHAR[cbData>>1];
memset(owner, 0, cbData);

#ifdef SP
result= RegQueryValueEx(hkPerUser, _T("Name"), NULL, &dwType,
(LPBYTE)owner, &cbData);
#else
result= RegQueryValueEx(hkPerUser, _T("Owner"), NULL, &dwType,
(LPBYTE)owner, &cbData);
#endif
if (result != ERROR_SUCCESS || dwType != REG_BINARY)
{
return FALSE;
}


The first RegOpenKeyEx return with a result of 0x57 instead of success... any ideas?
eh, sorry, my bad. I should have just changed the RegQueryValueEx to Name. Also, it seems they have changed the key type for the Smartphone.

anyway...
Thanks for your help. If you have a Smartphone, I'd love to give you a copy of Virtual Pool Mobile. PM me if you are interested.

Cheers,

rcp
You've got a memory leak if RegQueryValueEx fails.

Dan East
oops!! I really hate the 'path less traveled'. :)