Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / SmartPhones / July 2008

Tip: Looking for answers? Try searching our database.

How to figure Device type using RAPI ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shiv - 09 Mar 2006 19:50 GMT
How can i figure if the connected device is a PocketPC or a Smartphone via
RAPI ?
Peter Foot [MVP] - 09 Mar 2006 20:36 GMT
I'm not sure there is an easy method exposed as a RAPI function, however
once you have an active connection you can query some device properties from
the desktop registry:-
HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services
Value named DeviceType contains the platform name e.g. "PocketPC" or
"Smartphone" You can also get DeviceOemInfo which has an OEM specific
identifier.

Peter

Signature

Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

> How can i figure if the connected device is a PocketPC or a Smartphone via
> RAPI ?
Shiv - 10 Mar 2006 20:04 GMT
Peter,

Thank you. This seems like something that i can use.

Do you know where the value for DeviceOemInfo comes from ? Iam sure it comes
form the device so i was wondering if it is in a well known location on the
Device Registry that other programs can query. Also the same with the
DeviceType. Is it somewhere on the device ?

Any help is greatly appreciated.

Thanks,

Shiva

> I'm not sure there is an easy method exposed as a RAPI function, however
> once you have an active connection you can query some device properties from
[quoted text clipped - 8 lines]
> > How can i figure if the connected device is a PocketPC or a Smartphone via
> > RAPI ?
Peter Foot [MVP] - 13 Mar 2006 09:49 GMT
Both are accessible on the device with SystemParametersInfo API with
constants SPI_GETOEMINFO and SPI_GETPLATFORMTYPE

Peter

Signature

Peter Foot
Windows Embedded MVP
www.peterfoot.net | www.inthehand.com

> Peter,
>
[quoted text clipped - 27 lines]
>> > via
>> > RAPI ?
Michael Gledhill - 17 Jul 2008 19:36 GMT
Hi Peter,

> >> once you have an active connection you can query some device properties
> >> from
> >> the desktop registry:-
> >> HKEY_CURRENT_USER\Software\Microsoft\Windows CE Services
> >> Value named DeviceType contains the platform name e.g. "PocketPC" or
> >> "Smartphone"

 I've been successfully using this registry value for years, and it's all
worked fine..  until the monster called Vista came along.

 If I have code to check this value in my application, but the user who's
running it doesn't have Admin rights  (as is quite possible), then I can't
query this key, it fails.    
 I'm deliberately trying to open the registry key with just
"KEY_QUERY_VALUE" access, so Vista doesn't think I'm a nasty
process attempting to corrupt Microsoft's own registry settings, but
this just doesn't work for non-Admin users.

 If a Vista admin user runs it, or if the user "upgrades" to Windows XP,
then it works a treat again.

 Oh, and yes, I do have a Manifest file for my app, but I don't want to
add "requireAdministrator" as a requestedPrivilege, as I want to keep
the security settings as low as possible.


 Any suggestions to make this work ?

 Mike

> Both are accessible on the device with SystemParametersInfo API with
> constants SPI_GETOEMINFO and SPI_GETPLATFORMTYPE
[quoted text clipped - 32 lines]
> >> > via
> >> > RAPI ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.