Delphi Sources

Проверить, заблокирована ли рабочая станция



Оформил: DeeCo

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;







Copyright © 2004-2025 "Delphi Sources" by BrokenByte Software. Delphi World FAQ

Группа ВКонтакте