【API】GetSystemInfo 函数使用

typedef struct _SYSTEM_INFO {
    union {
        DWORD dwOemId;          // Obsolete field...do not use
        struct {
            WORD wProcessorArchitecture;
            WORD wReserved;
        } DUMMYSTRUCTNAME;
    } DUMMYUNIONNAME;
    DWORD dwPageSize;
    LPVOID lpMinimumApplicationAddress;
    LPVOID lpMaximumApplicationAddress;
    DWORD_PTR dwActiveProcessorMask;
    DWORD dwNumberOfProcessors;
    DWORD dwProcessorType;
    DWORD dwAllocationGranularity;
    WORD wProcessorLevel;
    WORD wProcessorRevision;
} SYSTEM_INFO, *LPSYSTEM_INFO;

	SYSTEM_INFO SysInfo = {0};
	GetSystemInfo(&SysInfo);
根据返回值可以判断

dwPageSize  //页大小

lpMinimumApplicationAddress  // 基地址 0x00010000

lpMaximumApplicationAddress //    0x7ffeffff

dwProcessorType

PROCESSOR_INTEL_386
 386
 
PROCESSOR_INTEL_486
 486
 
PROCESSOR_INTEL_PENTIUM
 586
 
PROCESSOR_INTEL_IA64
 2200
 
PROCESSOR_AMD_X8664
 8664
 





你可能感兴趣的:(VC++)