//聲明:GetSystemInfo(
//舉例:
var lpSystemInfo: TSystemInfo {}
);
//TSystemInfo 是 _SYSTEM_INFO 結構的重定義:
_SYSTEM_INFO = record
case Integer of
0: (
dwOemId: DWORD); {返回計算機標識符, 已廢棄}
1: (
wProcessorArchitecture: Word; {處理器的體系結構}
wReserved: Word; {保留}
dwPageSize: DWORD; {分頁大小}
lpMinimumApplicationAddress: Pointer;{最小尋址空間}
lpMaximumApplicationAddress: Pointer;{最大尋址空間}
dwActiveProcessorMask: DWORD; {處理器掩碼; 0..31 表示不同的處理 器}
dwNumberOfProcessors: DWORD; {處理器數目}
dwProcessorType: DWORD; {處理器類型}
dwAllocationGranularity: DWORD; {虛擬內存空間的粒度}
wProcessorLevel: Word; {處理器等級}
wProcessorRevision: Word); {處理器版本}
end;procedure TForm1.FormCreate(Sender: TObject);
var
SI: TSystemInfo;
begin
GetSystemInfo(SI);
Memo1.Clear;
with Memo1.Lines do
begin
Add(Format('OEMID:' + #9#9 + '%d', [SI.dwOemId]));
Add(Format('處理器體系結構:' + #9 + '%d', [SI.wProcessorArchitecture]));
Add(Format('分頁大小:' + #9 + '%d', [SI.dwPageSize]));
Add(Format('最小尋址空間:' + #9 + '%d', [Integer (SI.lpMinimumApplicationAddress)]));
Add(Format('最大尋址空間:' + #9 + '%d', [Integer (SI.lpMaximumApplicationAddress)]));
Add(Format('處理器掩碼:' + #9 + '%d', [SI.dwActiveProcessorMask]));
Add(Format('處理器數目:' + #9 + '%d', [SI.dwNumberOfProcessors]));
Add(Format('處理器類型:' + #9 + '%d', [SI.dwProcessorType]));
Add(Format('虛擬內存粒度:' + #9 + '%d', [SI.dwAllocationGranularity]));
Add(Format('處理器等級:' + #9 + '%d', [SI.wProcessorLevel]));
Add(Format('處理器版本:' + #9 + '%d', [SI.wProcessorRevision]));
end;
end;
//效果圖: