zbd
13th November 2006 22:11 UTC
getting unique device id from pocket pc
i want to get the 6 digit device code from my pda
i've heard that this 6 digit number i have is taken from a longer string of numbers, i was hoping it might be in the registry somewhere.
i've also heard that maybe a .dll will need to be used to grab the code from the device but i have no idea how to write them.
if anyone has the slightest of ideas, can they let me know
thanks
zbd
13th November 2006 22:52 UTC
is there a system call for
GetDeviceUniqueID
?
p.s. and i think the UUID from which i get the 6 digit code from is a 32 digit code
zbd
14th November 2006 03:42 UTC
the call to get the deivce id in c++ for windows api
if (KernelIoControl(IOCTL_HAL_GET_DEVICEID, IntPtr.Zero,
0, outbuff, nBuffSize, ref dwOutBytes))
{
done = true;
}
HAL = hardware abstraction layer
the method
[DllImport("coredll.dll", SetLastError=true)]
private static extern bool KernelIoControl(Int32 dwIoControlCode,
IntPtr lpInBuf, Int32 nInBufSize, byte[] lpOutBuf,
Int32 nOutBufSize, ref Int32 lpBytesReturned);
is there some way to do a similar thing with the system plugin?
thek
14th November 2006 08:57 UTC
very unlikly because your code have to run on the pocketpc device...
I had the same problem, trying to copyprotected our software for the pda.
Solved it by requiring a simple Licensekey for the pda (which is based on the DeviceID
zbd
14th November 2006 22:24 UTC
i haven't tried using a dll yet, but is it possible to use one and then get a return value from it? i'll give it a go...
and the dll would have to run on the pocket pc would it?