 |
| Locking the workstation |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |
The LockWorkStation function has the same result as pressing Ctrl+Alt+Del and clicking Lock Workstation. To unlock the workstation, the user must log in.
The code sample shows how to link code execution to the Lock and Unlock events (requires VFP9).
|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 3225 bytes Created: 2002-04-16 22:24:46 Modified: 2009-02-02 10:19:34 Visits in 7 days: 160 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
The LockWorkStation function is callable only by processes running on the interactive desktop. In addition, the user must be logged on, and the workstation cannot already be locked.
To receive notification when the user logs in, use the WTSRegisterSessionNotification function to receive WM_WTSSESSION_CHANGE messages.
* * *
Feb.2, 2009: code sample rewritten. |
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|