How to check if the Workstation is locked?
Материал из DRKB
How to check if the Workstation is locked?[править | править код]
function IsWorkstationLocked: Boolean;
var
hDesktop: HDESK;
begin
Result := False;
hDesktop := OpenDesktop('default',
0, False,
DESKTOP_SWITCHDESKTOP);
if hDesktop <> 0 then
begin
Result := not SwitchDesktop(hDesktop);
CloseDesktop(hDesktop);
end;
end;
Source: Взято с сайта http://www.swissdelphicenter.ch/en/tipsindex.php
ID: 01698