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

Pocket PC Serial Numbers


Re: Pocket PC Serial Numbers

Postby Dan East » Jul 31, 2001 @ 1:47pm

Okay, here's what I've been able to determine. The DEVICEID IOCTL is not used by the OEMs at this time. <br>However you can use IOCTL_HAL_GET_UUID IOCTL to get the iPaq's serial number. iPaq also provides a good wrapper SDK that lets you get the ID with a single function call:<br>http://csa.compaq.com/CSA_For_iPAQ_Developers_CD.shtml<br>I noted that when using the UUID IOCTL directly with the iPaq the result is not in the same sequence as the real serial number. I got this result (ABCDEFGHIJKL is the correct order):<br>DCBAFEHGIJKL <br>So I guess you would have to correctly sequence that result if you use UUID directly. The iPaq SDK function CPQInfoGetSerialNo() returns the exact serial number as found on the back of the device.<br><br>From all the searching I've done it doesn't appear that anyone has found a method of obtaining the Device ID on a Casio Pocket PC. Someone said that they were able to use the UUID IOCTL with a Casio, but it has also been reported that it will not work on an E-125.<br>If anyone finds a method for accessing the serial number on a Casio or HP Please post that information here or email me.<br><br>Here's the definition for the UUID IOCTL:<br><br>[fixed]#define IOCTL_HAL_GET_UUID CTL_CODE(FILE_DEVICE_HAL, 13,   METHOD_BUFFERED, FILE_ANY_ACCESS)[/fixed]<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Pocket PC Serial Numbers

Postby Dan East » Jul 31, 2001 @ 1:56pm

Here's a sample using the UUID IOCTL. An example I saw on the web showed that it returns a UNICODE value, but it does not on the iPaq, so you have to convert it.<br>First off, you need to prototype the KernelIoControl function:<br>[fixed]<br>extern "C" BOOL KernelIoControl (<br> DWORD dwIoControlCode,<br> LPVOID lpInBuf,<br> DWORD nInBufSize,<br> LPVOID lpOutBuf,<br> DWORD nOutBufSize,<br> LPDWORD lpBytesReturned );[/fixed]<br><br>Here it is:<br>[fixed]<br>char rgtcAsset[64]; <br>unsigned long Len=sizeof(rgtcAsset);<br>memset(rgtcAsset, 0, Len); <br>if (KernelIoControl(IOCTL_HAL_GET_UUID, NULL, 0, (LPVOID)rgtcAsset, Len, &Len)) {<br>  TCHAR buf[64];<br>  MultiByteToWideChar(CP_ACP, NULL, rgtcAsset, -1, buf, sizeof(buf)/sizeof(TCHAR));<br><br>  //hopefully buf now contains the device's SN.<br>}<br>[/fixed]<br><br>Don't forget to use the IOCTL_HAL_GET_UUID definition in the previous post.<br><br>If anyone would take the time to see if that works with the Casios and HPs it would be very cool...<br><br>Dan East<br>
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Pocket PC Serial Numbers

Postby Moose or Chuck » Jul 31, 2001 @ 7:01pm

At which time we send buf to Microsoft so they can create a database of users and rule the world yet again.
Moose or Chuck
 


Previous

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

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

cron