PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework detect pocket pc OS

Reply

detect pocket pc OS

 
Thread Tools Rate Thread
Old 08-07-2003, 02:53 PM   #1
Zen
Guest
 
Posts: n/a
Default detect pocket pc OS


Is there a way to detect the pocket pc OS programmatically in .NET?

I need to distinguish Pocket PC 2000, Pocket PC 2002, and Pocket PC 2003.

Thanks a lot!


  Reply With Quote
Old 08-07-2003, 04:21 PM   #2
Harry Simpson
Guest
 
Posts: n/a
Default Re: detect pocket pc OS

Clarification Alex,

IF it's a PPC2000 it will return a value of "PalmPC"???

Great info, i just want to verify it before i commit to notes.

Harry

"Alex Yakhnin [eMVP]" <a.yakhnin@nodirectemails.att.net> wrote in message
news:010601c34569$26115aa0$a301280a@phx.gbl...
> The Environment.OSVersion will return a
> System.OperatingSystem with the following Platform values:
>
> Pocket PC 2000 Pocket PC 2002 Pocket PC 2003.
> "PalmPC" "PocketPC" "WinCE"
>
>
> --
> Alex Yakhnin, Microsoft Embedded MVP
> IntelliProg, Inc.
> http://www.intelliprog.com
> "Check out our Compact Framework controls..."
>
>
> >-----Original Message-----
> >Is there a way to detect the pocket pc OS

> programmatically in .NET?
> >
> >I need to distinguish Pocket PC 2000, Pocket PC 2002, and

> Pocket PC 2003.
> >
> >Thanks a lot!
> >
> >
> >.
> >



  Reply With Quote
Old 08-07-2003, 08:25 PM   #3
Alex Yakhnin [eMVP]
Guest
 
Posts: n/a
Default Re: detect pocket pc OS

Umm.. yes you are right.

My assumption was that it wraps a SystemParametersInfo.
Obviously it's not =), but you can call it yourself;
something like that:
==========================================================
internal const int SPI_GETPLATFORMTYPE = 257;
[DllImport("coredll.dll")]
internal static extern int SystemParametersInfo (
int uiAction,
int uiParam,
string pvParam,
int fWinIni );

if (SystemParametersInfo(SPI_GETPLATFORMTYPE,
szPlatform.Length , szPlatform, 0)!=0)
{
string strPlatform = szPlatform.Substring(0, 8);
if (strPlatform == temp)
return true;
}
======================================================

-Alex



>-----Original Message-----
>Thanks, I just did a test with the iPaq device that I have
>
>both Pocket PC 2000 and 2002 returns "WinCE"
>
>But 2000 has a build number of 3.0.9348
>and 2002 has a build number of 3.0.11171
>
>I had to use the build number to distinguish those 2 OS.
>
>"Alex Yakhnin [eMVP]" <a.yakhnin@nodirectemails.att.net>

wrote in message
>news:010601c34569$26115aa0$a301280a@phx.gbl...
>> The Environment.OSVersion will return a
>> System.OperatingSystem with the following Platform

values:
>>
>> Pocket PC 2000 Pocket PC 2002 Pocket PC 2003.
>> "PalmPC" "PocketPC" "WinCE"
>>
>>
>> --
>> Alex Yakhnin, Microsoft Embedded MVP
>> IntelliProg, Inc.
>> http://www.intelliprog.com
>> "Check out our Compact Framework controls..."
>>
>>
>> >-----Original Message-----
>> >Is there a way to detect the pocket pc OS

>> programmatically in .NET?
>> >
>> >I need to distinguish Pocket PC 2000, Pocket PC 2002,

and
>> Pocket PC 2003.
>> >
>> >Thanks a lot!
>> >
>> >
>> >.
>> >

>
>
>.
>

  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