WM obtains mobile phone information

Source: Internet
Author: User

1.

Systemparametersinfo can only obtain the platform (SP, PPC) and mobile phone model.

 

 

 

2.

Getversionex can only obtain the master version, secondary version (for CE version), and build version, but cannot obtain the Windows Mobile version.
(Windows Mobile 6.1 or Windows Mobile 6.5)

 

 

 

3. Obtain the operating system version in two ways:

A:

Kerneliocontrol (ioctl_processor_information ,)...

However, pkfuncs. h and toolhelp. h are required. Download Windows CE 5.0 or auk (not free ).

 

B. Another method:

 

# Define pocketpcv1 1
# Define smartphonev1 2
# Define pocketpcv2 3
# Define smartphonev2 4
Int mydevicetype ()
{
Tchar szplatform [max_string_buffer];
Int idevicetype = 0;
Osversioninfo osver;
Getversionex (& osver );
If (osver. dwmajorversion = 3)
{
If (systemparametersinfo (spi_getplatformtype, sizeof (szplatform), szplatform, 0 )! = 0)
{
If (lstrcmp (szplatform, text ("pocketpc") = 0)
{
Idevicetype = pocketpcv1; // runs on Pocket PC 2000 and 2002
}
Else if (lstrcmp (szplatform, text ("Smartphone") = 0)
{
Idevicetype = smartphonev1; // runs on Smartphone 2002
}
}
Else
{
If (getlasterror () = error_access_denied) // (5)
{
Idevicetype = smartphonev1; // is a smartphone:
// Smartphone creates an Access Denied error on
// Systemparametersinfo ()
}
}
}
Else
{
If (osver. dwmajorversion = 4)
{
If (systemparametersinfo (spi_getplatformtype, sizeof (szplatform), szplatform, 0 )! = 0)
{
If (lstrcmp (szplatform, text ("pocketpc") = 0)
{
Idevicetype = pocketpcv2; // runs on Pocket PC 2003
}
Else if (lstrcmp (szplatform, text ("Smartphone") = 0)
{
Idevicetype = smartphonev2; // runs on Smartphone 2003
}
}
Else
{
If (getlasterror () = error_access_denied) // (5)
{
Idevicetype = smartphonev2; // is a smartphone:
// Smartphone creates an Access Denied error on
// Systemparametersinfo ()
}
}
}
}
Return idevicetype;
}

Version Number OS version
3.0.9348 Pocket PC 2000
3.0.11171 Pocket PC 2002
4.20.xxxx Windows Mobile 2003
4.21.xxxx Windows Mobile 2003 se
5.1.342 Windows Mobile 5.0
5.2.20771 Windows Mobile 6.1

5.2.21869 Windows Mobile 6.5

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.