-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathPhysicalMemArrayInfo.dpr
56 lines (49 loc) · 1.63 KB
/
PhysicalMemArrayInfo.dpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
program PhysicalMemArrayInfo;
{$APPTYPE CONSOLE}
uses
Classes,
SysUtils,
uSMBIOS in '..\..\Common\uSMBIOS.pas';
procedure GetPhysicalMemArrayInfo;
Var
SMBios: TSMBios;
LPhysicalMemArr: TPhysicalMemoryArrayInformation;
begin
SMBios := TSMBios.Create;
try
WriteLn('Physical Memory Array Information');
WriteLn('--------------------------------');
if SMBios.HasPhysicalMemoryArrayInfo
then
for LPhysicalMemArr in SMBios.PhysicalMemoryArrayInfo do
begin
WriteLn('Location ' + LPhysicalMemArr.GetLocationStr);
WriteLn('Use ' + LPhysicalMemArr.GetUseStr);
WriteLn('Error Correction ' + LPhysicalMemArr.GetErrorCorrectionStr);
if LPhysicalMemArr.RAWPhysicalMemoryArrayInformation.MaximumCapacity <> $80000000
then
WriteLn(Format('Maximum Capacity %d Kb',
[LPhysicalMemArr.RAWPhysicalMemoryArrayInformation.MaximumCapacity]))
else
WriteLn(Format('Maximum Capacity %d bytes',
[LPhysicalMemArr.RAWPhysicalMemoryArrayInformation.ExtendedMaximumCapacity]));
WriteLn(Format('Memory devices %d',
[LPhysicalMemArr.RAWPhysicalMemoryArrayInformation.NumberofMemoryDevices]));
WriteLn;
end
else
WriteLn('No Physical Memory Array Info was found');
finally
SMBios.Free;
end;
end;
begin
try
GetPhysicalMemArrayInfo;
except
on E: Exception do
WriteLn(E.Classname, ':', E.Message);
end;
WriteLn('Press Enter to exit');
Readln;
end.