tsmbios
1.0.0
SMBIOS (System Management BIOS)는 DMTF가 개발 한 표준입니다. SMBIOS에 저장된 정보에는 장치 제조업체, 모델 이름, 일련 번호, BIOS 버전, 자산 태그, 프로세서, 포트 및 장치 메모리가 포함됩니다.
TSMBIOS Libary는 객체 Pascal Language (Delphi 또는 Free Pascal)를 사용하여 SMBIOS (System Management BIOS)에 액세스 할 수 있습니다.
이 코드는 시스템에 설치된 메모리 장치와 관련된 정보를 검색하는 방법을 보여줍니다.
{ $APPTYPE CONSOLE }
{ $R *.res }
uses
Classes,
SysUtils,
uSMBIOS in ' ....CommonuSMBIOS.pas ' ;
procedure GetMemoryDeviceInfo ;
Var
SMBios: TSMBios;
LMemoryDevice: TMemoryDeviceInformation;
begin
SMBios := TSMBios.Create;
try
WriteLn( ' Memory Device Information ' );
WriteLn( ' ------------------------- ' );
if SMBios.HasPhysicalMemoryArrayInfo then
for LMemoryDevice in SMBios.MemoryDeviceInformation do
begin
WriteLn(Format( ' Total Width %d bits ' ,[LMemoryDevice.RAWMemoryDeviceInfo.TotalWidth]));
WriteLn(Format( ' Data Width %d bits ' ,[LMemoryDevice.RAWMemoryDeviceInfo.DataWidth]));
WriteLn(Format( ' Size %d Mbytes ' ,[LMemoryDevice.GetSize]));
WriteLn(Format( ' Form Factor %s ' ,[LMemoryDevice.GetFormFactor]));
WriteLn(Format( ' Device Locator %s ' ,[LMemoryDevice.GetDeviceLocatorStr]));
WriteLn(Format( ' Bank Locator %s ' ,[LMemoryDevice.GetBankLocatorStr]));
WriteLn(Format( ' Memory Type %s ' ,[LMemoryDevice.GetMemoryTypeStr]));
WriteLn(Format( ' Speed %d MHz ' ,[LMemoryDevice.RAWMemoryDeviceInfo.Speed]));
WriteLn(Format( ' Manufacturer %s ' ,[LMemoryDevice.ManufacturerStr]));
WriteLn(Format( ' Serial Number %s ' ,[LMemoryDevice.SerialNumberStr]));
WriteLn(Format( ' Asset Tag %s ' ,[LMemoryDevice.AssetTagStr]));
WriteLn(Format( ' Part Number %s ' ,[LMemoryDevice.PartNumberStr]));
WriteLn;
if LMemoryDevice.RAWMemoryDeviceInfo.PhysicalMemoryArrayHandle> 0 then
begin
WriteLn( ' Physical Memory Array ' );
WriteLn( ' --------------------- ' );
WriteLn( ' Location ' +LMemoryDevice.PhysicalMemoryArray.GetLocationStr);
WriteLn( ' Use ' +LMemoryDevice.PhysicalMemoryArray.GetUseStr);
WriteLn( ' Error Correction ' +LMemoryDevice.PhysicalMemoryArray.GetErrorCorrectionStr);
if LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.MaximumCapacity<>$ 80000000 then
WriteLn(Format( ' Maximum Capacity %d Kb ' ,[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.MaximumCapacity]))
else
WriteLn(Format( ' Maximum Capacity %d bytes ' ,[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.ExtendedMaximumCapacity]));
WriteLn(Format( ' Memory devices %d ' ,[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.NumberofMemoryDevices]));
end ;
WriteLn;
end
else
Writeln( ' No Memory Device Info was found ' );
finally
SMBios.Free;
end ;
end ;
begin
try
GetMemoryDeviceInfo;
except
on E:Exception do
Writeln(E.Classname, ' : ' , E.Message);
end ;
Writeln( ' Press Enter to exit ' );
Readln;
end .
Delphinus 패키지 관리자를 설치하고 TSMBIOS를 패키지로 설치할 수 있습니다. (Delphinus-Support)