biosid.pas

来自「Delphi里 用于读取计算机的BIOS信息」· PAS 代码 · 共 38 行

PAS
38
字号
unit BiosId;

interface

function GetBiosId:String;
function GetBiosType:String;
function GetBiosDate:String;

implementation

function GetBiosIdA(P:PChar):LongBool;stdcall;External 'BiosID.dll' Name 'GetBiosId';
function GetBiosTypeA(P:PChar):LongBool;stdcall;External 'BiosID.dll' Name 'GetBiosType';
function GetBiosDateA(P:PChar):LongBool;stdcall;External 'BiosID.dll' Name 'GetBiosDate';

function GetBiosId:String;
var S:array[0..255] of Char;
begin
    GetBiosIdA(S);
    Result:=String(S);
end;

function GetBiosType:String;
var S:array[0..255] of Char;
begin
    GetBiosTypeA(S);
    Result:=String(S);
end;

function GetBiosDate:String;
var S:array[0..255] of Char;
begin
    GetBiosDateA(S);
    Result:=String(S);
end;


end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?