This site is no longer active and is available for archival purposes only. Registration and login is disabled.

retrieving owner's name


retrieving owner's name

Postby Phantom » Oct 13, 2001 @ 8:28am

Does anyone know (or have a code snippet) how to retrieve the owner's name from the registry? The Nutcracker is having problems generating a device key on upgraded iPaqs, and on MIPS I can't use this approach at all, so I am planning to use the owner's name to protect The Nutcracker (I know it's not waterproof, but it keeps at least neighbour software exchanges at a distance).<br>And another question; will the same approach still work with PPC2002? I'm having more problems with PPC2002 everyday...
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby Dan East » Oct 13, 2001 @ 3:20pm

Well, I don't have info on the actual struct that is used to store the info, but it is at:<br>HKEY_CURRENT_USER/ControlPanelOwner/Owner<br><br>After a quick check on my iPaq with a certain top-secret project of mine, I see the owner name starts at the first byte of the struct, and of course is in UNICODE. It looks like it is NULL terminated, because all padding bytes after it are zero, but that may not be true for all devices. The Company Name starts at 0x48, Address at 0x90, Home Phone at 0x204, and email at 0x236.<br><br>For the iPaq, by far the best solution is to get the device serial number. It is the only hardware that I know of (after extensive searching) that has the serial number burnt into the device in a software-accessable manner. Compaq has a small SDK to access that info on their website, or you can use a KernelIoControl call with IOCTL_HAL_GET_DEVICEID.<br><br>Dan East<br>
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: retrieving owner's name

Postby Phantom » Oct 15, 2001 @ 10:27am

The device ID solution for the iPaq does not seem to work on some devices that are flashed by Microsoft. So I intend to switch over to the owner name approach completely. I have to do that anyway, since I don't think there is a way to distuinguish an iPaq from a new Jornada with ARM processor...
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby Dan East » Oct 15, 2001 @ 11:13am

If you use Compaq's API (specifically CPQInfoGetSerialNo), it will fail on non-iPaq hardware. I had someone verify that on HP PPC 2002 hardware, and several other devices. I guess the question then is does that function fail on those MS upgraded iPaqs, or does it return an incorrect value? Can you point me to someone that has one of those devices that I can give a diagnostic program to?<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: retrieving owner's name

Postby Phantom » Oct 15, 2001 @ 11:22am

My e-mail is dead at the moment, but I can send you the address of the French webmaster that did the nice review. He has an iPaq that was flashed by Microsoft (the OS says it's PocketPC2002, v1.32), wich has button problems and reports a device ID of 0. He will probably be willing to run your diagnostics app.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby Dan East » Oct 15, 2001 @ 11:51am

Are you on MSN Messenger?<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: retrieving owner's name

Postby Phantom » Oct 15, 2001 @ 12:06pm

Nope, just ICQ: 9500700.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby Dan East » Oct 15, 2001 @ 12:32pm

ICQ won't work with my Proxy server, and after installing it on my other desktop PC it wouldn't let me login with my ICQ number or even send me my password - so screw it. You can just me.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: retrieving owner's name

Postby Phantom » Oct 16, 2001 @ 6:33am

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby Dan East » Oct 16, 2001 @ 9:51am

The code is right, but you aren't specifying the whole key path. The value you want is<br>HKEY_CURRENT_USER\ControlPanel\Owner\Owner:<br><br>[fixed]RegOpenKeyEx( HKEY_CURRENT_USER, L"ControlPanel\\Owner", 0, 0, &key );<br>RegQueryValueEx( key, L"Owner", NULL, NULL, buffer, &size );[/fixed]<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: retrieving owner's name

Postby Phantom » Oct 16, 2001 @ 12:20pm

Thanks a lot. :) I'll try it tonight.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby Phantom » Nov 5, 2001 @ 12:17pm

OK, code for this is going to be in EasyCE 1.5. That way everyone can protect his software properly the Easy way. :)
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: retrieving owner's name

Postby suchiaruzu » Nov 5, 2001 @ 1:28pm

You mean EasyCE 2 ;D
<div align="center">Image<br></div>
User avatar
suchiaruzu
pm Insider
 
Posts: 2570
Joined: May 3, 2001 @ 9:29am
Location: BFE


Re: retrieving owner's name

Postby Phantom » Nov 5, 2001 @ 2:26pm

No, it's an incremental update, not a rewrite. If I would ever build an EasyCE that comes as a baseclass that you can derive from and that has things like a resolution independent canvas and so on, I would call it EasyCE 2.0. This time, I simply added stuff that should have been in EasyCE already, like the PIXEL define, the tgaloader, a sprite class, relative paths etc. Quite useful, should take away the initial burden of platform specific stuff that you need to know to code for WindowsCE. And that's precisely what EasyCE is supposed to do. It should allow you to code, without the hassle, just the fun. :)
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum