Determining OS type and libraries compatibility

  • Thread starter Thread starter Zanna
  • Start date Start date
Z

Zanna

Hi,

I need to know if the device is a PocketPC or an HandledPC.

I found in this NG how to determine the OS version, but Ppc2003 is intended
to be a Ppc and no way to know if it is an handlesPc.

Also: libraries built for PocketPC are compatible with HandledPC?

I experienced another stange thing (only on Ppc): If I have App1 and App2
that use Lib1.dll, sometimes, when I recompile App1 and Lib1 (in the same VS
solution), without make changes to Lib1, App2 no longer works!
It tell me "LoadLibraryException".

Any idea?
 
You can easily get the OS version from Environment.OSVersion property. To
get the platform name you will need to P/Invoke SystemParametersInfo or use
the Smart Device Framework which includes an implementation, our
EnvironmentEx.PlatformName will return the platform name string e.g.
PocketPC, Smartphone etc
www.opennetcf.org/smartdeviceframework.asp

In general unless you are specifically targetting a feature on a particular
platform then you should probably choose Windows CE as the target type for
any class library project. Also in your case of recompiling, remember that
even if you make no code changes your version number will be
auto-incremented by visual studio unless you supply a full version number -
see the AssemblyInfo.cs (or .vb) for the project to set this attribute.

Peter
 
Handhel PC is based on CE 2.11, which is definitely not supported by the
Compact Framework, so I'd not be surprised by any errors you get. In fact
I'm surprised much of anything will run. The performance must be abhorrent.

-Chris
 
Peter Foot said:
You can easily get the OS version from Environment.OSVersion property. To
get the platform name you will need to P/Invoke SystemParametersInfo

So I have to base on the paltform name rather on a numeric value or
enumerator to decide the type of the device?

In general unless you are specifically targetting a feature on a particular
platform then you should probably choose Windows CE as the target type for
any class library project.

If I choose this I cannot use the InputPanel :)
Also in your case of recompiling, remember that
even if you make no code changes your version number will be
auto-incremented by visual studio unless you supply a full version number -
see the AssemblyInfo.cs (or .vb) for the project to set this attribute.

Oh! And this determine the compatibility?

Thanks!
 
Chris Tacke said:
Handhel PC is based on CE 2.11, which is definitely not supported by the
Compact Framework

Sorry, my fault: with HandledPC I mean that PocketPC 640x320 screen size
with WinCe 4.1 or WinCe.net

Thanks
 
See my other post about SystemParamtersInfo to get the platform name. While
all Pocket PCs will return "PocketPC", there is no fixed platform name for
the wide variety of CE.NET based devices.

Peter
 
So really the difference is screen size? You can query that directly by
using the Screen class (plus all of Peter's suggestions).

-Chris
 
Back
Top