IOCTL_HAL_GET_DEVICEID not returning a unique ID :(

P

Paul

I've been using a call to IOCTL_HAL_GET_DEVICEID in a VB.NET project to
return the unique 2 part device ID of a PDA and it's been behaving fine on
many different devices, however, we've recently got some iPAQ 214 PDAs in and
all of a sudden the code is returning exactly the same ID for each iPAQ 214
we run it on...

It's fine on other iPAQ's and all other brands we've used seem fine, it's
just the iPAQ 214's.... I've seen a million forum questions with people
asking how to get a unique ID from a PDA and all the answers seem to be to do
it the way I'm doing it using KernelIoControl and IOCTL_HAL_GET_DEVICEID...
So why isn't it working in this one specific case?

Any ideas anyone?

Thanks,

Paul
 
P

Paul G. Tobey [eMVP]

That's up to the device vendor to implement. If they don't, you don't get
anything.

Paul T.
 
P

Peter Foot

Try using the supported GetDeviceUniqueId API. It doesn't give you a serial
number but gives an ID unique for each device when used with your own hash
code:-
http://blogs.msdn.com/windowsmobile/archive/2006/01/09/510997.aspx
It's supported on all WM5.0 and later devices.

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - Software Solutions for a Mobile World
In The Hand Ltd - .NET Components for Mobility
 
P

Paul

I was under the impression (perhaps wrongly) that is the device didn't
support it then it would return nothing, not a value that looks exactly like
a unique ID, except isn't unique.

I find it strange that every other iPAQ model we've tested it with works
fine, its just the 214 thats causing problems, its almost like a bug in that
model device.... I've raised the issue with HP tech support so I guess I'll
have to wait and see what they say... Thanks for the reply tho.

Paul
 
P

Paul

Thanks Peter!

That seems to work, I'd still love to know what was so special about the
iPAQ 214's that mean the other way doesn't work properly, but at least this
seem to be working so thats progress. :)

Thanks again,


Paul
 
P

Paul G. Tobey [eMVP]

Yes, they just made a mistake, a bug in that model/version of the device.
Presumably, they intended to return something unique and someone screwed it
up.

Paul T.
 

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