GetSystemInfo函数用于获取当前系统的信息
typedef struct _SYSTEM_INFO {
union {
DWORD dwOemId; // Obsolete field...do not use
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;
处理器版本号
#define PROCESSOR_INTEL_386 386
#define PROCESSOR_INTEL_486 486
#define PROCESSOR_INTEL_PENTIUM 586
#define PROCESSOR_MIPS_R4000 4000 // incl R4101 & R3910 for Windows CE
#define PROCESSOR_ALPHA_21064 21064
#define