想编程取得一些系统参数?(50分)

  • 主题发起人 主题发起人 tian
  • 开始时间 开始时间
T

tian

Unregistered / Unconfirmed
GUEST, unregistred user!
1.CPU型号、主频、当前可用的物理内存?
2.网络子网掩码?
 
Win32 API:
VOID GetSystemInfo(
LPSYSTEM_INFO lpSystemInfo // address of system information structure
);

typedef struct _SYSTEM_INFO { // sinf
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;

各域含义请看Win32API Help关于GetSystemInfo
 
同意蚯蚓
 
接受答案了.
 
后退
顶部