The Device ID length

D

davebythesea

Hi,

I am using pInvoke of KernelIoControl in the coredll to obtain the unique
Device ID. After reading up on the Device ID it appears to be stored in 16
bytes. I have an older PocketPC 2003 (HP iPAQ), and the Device ID is quite
short, it looks like this (i changed some of the characters)

0f25213c-1d0f-4109-0900-0050bf2000f

Now I am running the code on a newer device (HP iPAQ 214), and the Device ID
is a lot longer, it looks like this (i changed some of the characters)

50006f00-6300-6b00-6500-74005000470000004960485042523232306f323433333800

So, I'm wondering, what would be the maximum size in characters the Device
ID can be? Would it be 128 characters?

Thanks for any info,
D
 
P

Peter Foot

There isn't a defined length and it can vary, however there are two defined
parts to it, one to represent the platform and one the device. For Windows
Mobile 5.0 and later it is recommended you use GetDeviceUniqueID instead.
This will always return 20bytes.

Peter
 
D

davebythesea

Thanks for the information Peter. GetDeviceUniqueID sounds a lot more user
friendly to use that the pInvoke method. Hopefully when we move away from
supporting PPC 2003 I can use all the good stuff in Mobile 5 and 6 SDK.

The reason I'm curious as to what length the Device ID could be is just for
storage purposes in a database i.e. what size should the field be in the
database table which stores the Device ID. I was thinking of making it 100
length nvarchar. Just dont what to shoot myself in the foot if a longer
Device ID comes along... :)

Thanks once again for your advice.

Dav
 
P

Peter Foot

The data is binary and I've only ever seen devices return 16 or 20 bytes, to
display this as text in hex notation requires at most 40 characters, if you
used 100 that would be a comfortable size to hopefully cope with any device
available in the field.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top