locked
Comment accéder à la page " a propos de" RRS feed

  • Question

  • Je débute en programmation sur Win mobile et je ne sais pas comment récupérer l'information hardware,OS,etc programmatiquement.
    On m'a dit que c'est possible d'accéder la page "about" ou "à propos de" qui se situe sous windows pour récupérer ces informations. mais j'ai cherché cette page pour plusieurs téléphones, des fois il en n'existe pas( peut être je l'ai pas trouvée), qqn peut me guider un peu?
    mercredi 6 août 2008 10:02

Réponses

  • Les informations sur le Hardware sont récuparables avec la fonction suivante:

    Code Snippet
    VOID GetSystemInfo(   LPSYSTEM_INFO lpSystemInfo); 

     

     

    La structure SYSTEM_INFO contient tout cela:
    Code Snippet
    typedef struct _SYSTEM_INFO {  union {  DWORD dwOemId;  struct {    WORD wProcessorArchitecture;    WORD wReserved;  };};  DWORD dwPageSize;  LPVOID lpMinimumApplicationAddress;  LPVOID lpMaximumApplicationAddress;  DWORD dwActiveProcessorMask;  DWORD dwNumberOfProcessors;  DWORD dwProcessorType;  DWORD dwAllocationGranularity;  WORD wProcessorLevel;  WORD wProcessorRevision;} SYSTEM_INFO, *LPSYSTEM_INFO;

     

     

     
    Description des champs pour Windows CE (différent de XP)

    Members

    dwOemId
    Obsolete, do not use.
    wProcessorArchitecture
    The system's processor architecture.

    The following list shows the possible values for this member:

    • PROCESSOR_ARCHITECTURE_INTEL
    • PROCESSOR_ARCHITECTURE_MIPS
    • PROCESSOR_ARCHITECTURE_UNKNOWN
    • PROCESSOR_ARCHITECTURE_SHX
    • PROCESSOR_ARCHITECTURE_ARM
    wReserved
    This is reserved for future use.
    dwPageSize
    The page size and the granularity of page protection and commitment. This is the page size used by the VirtualAlloc function.
    lpMinimumApplicationAddress
    Pointer to the lowest memory address accessible to applications and DLLs.
    lpMaximumApplicationAddress
    Pointer to the highest memory address accessible to applications and DLLs.
    dwActiveProcessorMask
    This specifies a mask representing the set of processors configured into the system. Bit 0 is processor 0; bit 31 is processor 31.
    dwNumberOfProcessors
    The number of processors in the system.
    dwProcessorType
    The type of processor in the system.

    This is no longer relevant. Use the wProcessorArchitecture, wProcessorLevel, and wProcessorRevision members to determine the type of processor.

    The following list shows the possible values for this member:

    • PROCESSOR_INTEL_386
    • PROCESSOR_INTEL_486
    • PROCESSOR_INTEL_PENTIUM
    • PROCESSOR_INTEL_PENTIUMII
    • PROCESSOR_MIPS_R4000
    • PROCESSOR_HITACHI_SH3
    • PROCESSOR_HITACHI_SH4
    • PROCESSOR_STRONGARM
    • PROCESSOR_ARM720
    • PROCESSOR_MIPS_R5000
    • PROCESSOR_SHx_SH3DSP
    dwAllocationGranularity
    The granularity with which virtual memory is allocated.

    For example, a VirtualAlloc request to allocate 1 byte will reserve an address space of dwAllocationGranularity bytes.

    This value was hard coded as 64 KB in the past, but other hardware architectures may require different values.

    wProcessorLevel
    The system's architecture-dependent processor level.

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_INTEL, wProcessorLevel can be one of the following values.

    ValueDescription
    4Intel 80486
    5Pentium

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_ARM, wProcessorLevel can be one of the following values.

    ValueDescription
    4ARM version 4

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_MIPS, wProcessorLevel can be one of the following values.

    ValueDescription
    3MIPS R3000
    4MIPS R4000
    5MIPS R5000

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_SHX, wProcessorLevel can be one of the following values.

    ValueDescription
    3SH3 or SH3-DSP
    4SH4
    wProcessorRevision
    Specifies an architecture-dependent processor revision. The following table shows how the revision value is assembled for each type of processor architecture.
    ValueDescription
    Intel 80386 or 80486A value of the form xxyz.

    If xx is equal to 0xFF, y - 0xA is the model number, and z is the stepping identifier. For example, an Intel 80486-D0 system returns 0xFFD0.

    If xx is not equal to 0xFF, xx + 'A' is the stepping letter and yz is the minor stepping.

    Intel Pentium, Cyrix, or NextGen 586A value of the form xxyy, where xx is the model number and yy is the stepping. For example, a value of 0x0201 indicates Model 2, Stepping 1.
    MIPSA value of the form 00xx, where xx is the 8-bit revision number of the processor (the low-order 8 bits of the PRId register).
    SHxThe wProcessRevision is always set to 0.
    ARMIs a value from 1 to 16. Consult your ARM CPU manual.

    Pour ce qui est de la version d'OS la fonction est:

    Code Snippet
    BOOL GetVersionEx(   LPOSVERSIONINFO lpVersionInformation);

     

    la structure OSVERSIONINFO contient:
    Code Snippet
    typedef struct _OSVERSIONINFO{   DWORD dwOSVersionInfoSize;   DWORD dwMajorVersion;   DWORD dwMinorVersion;   DWORD dwBuildNumber;   DWORD dwPlatformId;   TCHAR szCSDVersion[128]; } OSVERSIONINFO; 

     

     les champs sont:

    Members

    dwOSVersionInfoSize
    The size, in bytes, of this data structure. Set this member to sizeof(OSVERSIONINFO) before calling the GetVersionEx function.
    dwMajorVersion
    This identifies the major version number of the OS. For example, for Windows CE 2.10, the major version number is 2.
    dwMinorVersion
    This identifies the minor version number of the OS. For example, for Windows CE 2.10, the minor version number is 1.
    dwBuildNumber
    This identifies the build number of the OS or is set to 0.
    dwPlatformId
    This identifies the OS. The following table shows the possible values for this member.
    ValueDescription
    VER_PLATFORM_WIN32sSpecifies the Windows 3.1 OS.
    VER_PLATFORM_WIN32_WINDOWSSpecifies the Windows 95 or Windows 98 OS.

    For Windows 95, dwMinorVersion is zero.

    For Windows 98, dwMinorVersion is greater than zero.

    VER_PLATFORM_WIN32_NTSpecifies the Windows NT OS.
    VER_PLATFORM_WIN32_CESpecifies the Windows CE OS.
    szCSDVersion
    Null-terminated string that provides arbitrary additional information about the OS.

    Requirements

    OS Versions: Windows CE 1.0 and later.
    Header: Winbase.h.

    Cordialement

    Thierry Joubert - THEORIS

    vendredi 8 août 2008 10:45

Toutes les réponses

  • Salut,

    Que souhaites tu faires exactement ?
    Tu veux afficher la page About ou récupérer les infos et les afficher sur une interface à toi ?
    Sous quel language ?
    Soit plus précis, donne des éléments

    Molux
    jeudi 7 août 2008 09:23
  • Les informations sur le Hardware sont récuparables avec la fonction suivante:

    Code Snippet
    VOID GetSystemInfo(   LPSYSTEM_INFO lpSystemInfo); 

     

     

    La structure SYSTEM_INFO contient tout cela:
    Code Snippet
    typedef struct _SYSTEM_INFO {  union {  DWORD dwOemId;  struct {    WORD wProcessorArchitecture;    WORD wReserved;  };};  DWORD dwPageSize;  LPVOID lpMinimumApplicationAddress;  LPVOID lpMaximumApplicationAddress;  DWORD dwActiveProcessorMask;  DWORD dwNumberOfProcessors;  DWORD dwProcessorType;  DWORD dwAllocationGranularity;  WORD wProcessorLevel;  WORD wProcessorRevision;} SYSTEM_INFO, *LPSYSTEM_INFO;

     

     

     
    Description des champs pour Windows CE (différent de XP)

    Members

    dwOemId
    Obsolete, do not use.
    wProcessorArchitecture
    The system's processor architecture.

    The following list shows the possible values for this member:

    • PROCESSOR_ARCHITECTURE_INTEL
    • PROCESSOR_ARCHITECTURE_MIPS
    • PROCESSOR_ARCHITECTURE_UNKNOWN
    • PROCESSOR_ARCHITECTURE_SHX
    • PROCESSOR_ARCHITECTURE_ARM
    wReserved
    This is reserved for future use.
    dwPageSize
    The page size and the granularity of page protection and commitment. This is the page size used by the VirtualAlloc function.
    lpMinimumApplicationAddress
    Pointer to the lowest memory address accessible to applications and DLLs.
    lpMaximumApplicationAddress
    Pointer to the highest memory address accessible to applications and DLLs.
    dwActiveProcessorMask
    This specifies a mask representing the set of processors configured into the system. Bit 0 is processor 0; bit 31 is processor 31.
    dwNumberOfProcessors
    The number of processors in the system.
    dwProcessorType
    The type of processor in the system.

    This is no longer relevant. Use the wProcessorArchitecture, wProcessorLevel, and wProcessorRevision members to determine the type of processor.

    The following list shows the possible values for this member:

    • PROCESSOR_INTEL_386
    • PROCESSOR_INTEL_486
    • PROCESSOR_INTEL_PENTIUM
    • PROCESSOR_INTEL_PENTIUMII
    • PROCESSOR_MIPS_R4000
    • PROCESSOR_HITACHI_SH3
    • PROCESSOR_HITACHI_SH4
    • PROCESSOR_STRONGARM
    • PROCESSOR_ARM720
    • PROCESSOR_MIPS_R5000
    • PROCESSOR_SHx_SH3DSP
    dwAllocationGranularity
    The granularity with which virtual memory is allocated.

    For example, a VirtualAlloc request to allocate 1 byte will reserve an address space of dwAllocationGranularity bytes.

    This value was hard coded as 64 KB in the past, but other hardware architectures may require different values.

    wProcessorLevel
    The system's architecture-dependent processor level.

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_INTEL, wProcessorLevel can be one of the following values.

    ValueDescription
    4Intel 80486
    5Pentium

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_ARM, wProcessorLevel can be one of the following values.

    ValueDescription
    4ARM version 4

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_MIPS, wProcessorLevel can be one of the following values.

    ValueDescription
    3MIPS R3000
    4MIPS R4000
    5MIPS R5000

    The following table shows that if wProcessorArchitecture is PROCESSOR_ARCHITECTURE_SHX, wProcessorLevel can be one of the following values.

    ValueDescription
    3SH3 or SH3-DSP
    4SH4
    wProcessorRevision
    Specifies an architecture-dependent processor revision. The following table shows how the revision value is assembled for each type of processor architecture.
    ValueDescription
    Intel 80386 or 80486A value of the form xxyz.

    If xx is equal to 0xFF, y - 0xA is the model number, and z is the stepping identifier. For example, an Intel 80486-D0 system returns 0xFFD0.

    If xx is not equal to 0xFF, xx + 'A' is the stepping letter and yz is the minor stepping.

    Intel Pentium, Cyrix, or NextGen 586A value of the form xxyy, where xx is the model number and yy is the stepping. For example, a value of 0x0201 indicates Model 2, Stepping 1.
    MIPSA value of the form 00xx, where xx is the 8-bit revision number of the processor (the low-order 8 bits of the PRId register).
    SHxThe wProcessRevision is always set to 0.
    ARMIs a value from 1 to 16. Consult your ARM CPU manual.

    Pour ce qui est de la version d'OS la fonction est:

    Code Snippet
    BOOL GetVersionEx(   LPOSVERSIONINFO lpVersionInformation);

     

    la structure OSVERSIONINFO contient:
    Code Snippet
    typedef struct _OSVERSIONINFO{   DWORD dwOSVersionInfoSize;   DWORD dwMajorVersion;   DWORD dwMinorVersion;   DWORD dwBuildNumber;   DWORD dwPlatformId;   TCHAR szCSDVersion[128]; } OSVERSIONINFO; 

     

     les champs sont:

    Members

    dwOSVersionInfoSize
    The size, in bytes, of this data structure. Set this member to sizeof(OSVERSIONINFO) before calling the GetVersionEx function.
    dwMajorVersion
    This identifies the major version number of the OS. For example, for Windows CE 2.10, the major version number is 2.
    dwMinorVersion
    This identifies the minor version number of the OS. For example, for Windows CE 2.10, the minor version number is 1.
    dwBuildNumber
    This identifies the build number of the OS or is set to 0.
    dwPlatformId
    This identifies the OS. The following table shows the possible values for this member.
    ValueDescription
    VER_PLATFORM_WIN32sSpecifies the Windows 3.1 OS.
    VER_PLATFORM_WIN32_WINDOWSSpecifies the Windows 95 or Windows 98 OS.

    For Windows 95, dwMinorVersion is zero.

    For Windows 98, dwMinorVersion is greater than zero.

    VER_PLATFORM_WIN32_NTSpecifies the Windows NT OS.
    VER_PLATFORM_WIN32_CESpecifies the Windows CE OS.
    szCSDVersion
    Null-terminated string that provides arbitrary additional information about the OS.

    Requirements

    OS Versions: Windows CE 1.0 and later.
    Header: Winbase.h.

    Cordialement

    Thierry Joubert - THEORIS

    vendredi 8 août 2008 10:45
  • Slt,

    Merci beaucoup. C'est exactement ce que je cherche. Avec la fonction GetSystemInfo, j'ai plus besoin de récupérer les infos dans la page de "a propos de".

    Merci encore, :-)

    yutoufr.
    lundi 11 août 2008 09:12