PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework OS Version

Reply

OS Version

 
Thread Tools Rate Thread
Old 24-04-2008, 03:52 PM   #1
masterik
Guest
 
Posts: n/a
Default OS Version


Hello,


How can i determine the OS/Platform version with .NETCF?
I need to know if my app runs on Windows CE or on Windows Mobile and the
version number...


Thanks in advance,
Malik

  Reply With Quote
Old 25-04-2008, 01:40 AM   #2
Christopher Fairbairn
Guest
 
Posts: n/a
Default Re: OS Version

Hi,

masterik wrote:
> How can i determine the OS/Platform version with .NETCF?
> I need to know if my app runs on Windows CE or on Windows Mobile and the
> version number...


Take a look at a blog post of mine titled "What device is my application
running on?" available at http://www.christec.co.nz/blog/archives/77.

You can obtain the Windows CE kernel version via the
System.Environment.OSVersion property. Combining this with P/Invoking
the SystemParameterInfo API (to query the SPI_GETPLATFORM property) will
enable you to differentiate between the various platforms and releases.

You may also be interested in determining the Adoption Kit Update (AKU)
in use by a given Windows Mobile device. See
http://www.christec.co.nz/blog/archives/337 for details on how to do this.

Hope this helps,
Christopher Fairbairn
  Reply With Quote
Old 25-04-2008, 01:49 AM   #3
Christopher Fairbairn
Guest
 
Posts: n/a
Default Re: OS Version

Hi,

Christopher Fairbairn wrote:
> Take a look at a blog post of mine titled "What device is my application
> running on?" available at http://www.christec.co.nz/blog/archives/77.


Also of note, if you are using .NET CF 3.5 there is a new
SystemSettings.Platform property (see the MSDN documentation at
http://msdn2.microsoft.com/en-us/li...s.platform.aspx)

This will be one of the enum values WinCEPlatform.PocketPC,
WinCEPlatform.Smartphone or WinCEPlatform.WinCEGeneric.

Hope this helps,
Christopher Fairbairn
  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off