THandle = Integer;
var
Time: TTimeRec;
Handle: THandle;
GetTime: TGetTime;
..
begin
Handle := LoadLibrary('DATETIME.DLL');
if Handle <> 0 then
begin
@GetTime := GetProcAddress(Handle, 'GetTime');
if @GetTime <> nil then
begin
GetTime(Time);
with Time do
WriteLn('The time is ', Hour, ':', Minute, ':', Second);
end;
文章来源于领测软件测试网 https://www.ltesting.net/