Accessing System Information (OS, Device type, etc)

R

rpatel4

My application needs to know a few things about what its running on.

If I can get the following at runtime that would be ideal (in order of
importance):
1. Operating System (eg. Windows Mobile 5)
2. Screen Size (I think this will be enough
Screen.PrimaryScreen.Bounds)
3. Device type (eg. PocketPc or Smartphone)
4. Device Model Number (ie Dell Axim, Motorola Q, etc etc).

Is there any managed code that will give me this information?

The reason for this information is because my app sends the information
to the server, and we want to be able to use this info in order to
format (or determine which) content to send back to the device.
 
P

Peter Foot [MVP]

System.Environment.OSVersion will return the CE version. Via additional
P/Invokes you can determine the Platform (Smartphone/ PocketPC etc), the
technique was recently blogged by the NETCF team:-
http://blogs.msdn.com/netcfteam/archive/2006/09/22/766343.aspx

The same technique can be used to get an OEM string for the device, but it
may not be an obvious human readable version of the device name. Use the
SPI_GETOEMINFO instead of SPI_GETPLATFORMTYPE in the article above.

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