> -   p .
>    ,  -  :
> 
> <%
> 2 CONSTANT UOI_NAME
> WINAPI: OpenInputDesktop USER32.DLL
> USER-VALUE hDsk
> USER-CREATE Desknbuf 128 USER-ALLOT
> : DeskName { hdsk -- a u }
>     Desknbuf 0!
>     0 SP@ 1028 Desknbuf UOI_NAME hdsk GetUserObjectInformationA
>     2DROP
>     Desknbuf ASCIIZ>    
> ;
> : WorkstationLocked? ( -- ? )
>     0 0 0 OpenInputDesktop TO hDsk 
>     hDsk DeskName S" Winlogon" COMPARE 
>     IF 
>       FALSE
>     ELSE
>       GetCurrentThreadId GetThreadDesktop >R
>       hDsk SetThreadDesktop DROP
>       WIN-EXIST: "  "
>       WIN-EXIST: "Windows Logon" OR
>       R> SetThreadDesktop DROP
>     THEN
>     hDsk CloseDesktop DROP 
> ;
> %>
> 
> #( test_winlogon
> Action:
>   BEGIN  
>     PAUSE: 1000
>     WorkstationLocked?
>   UNTIL
>   BEEP: 200 200
> )#
> 
> p   p.
>   win2k, winxp rus.
>   win   win-exist   .
> 
> 
> p.s.:   ,  'p'  win-exist   .
> 
> Vadim

