Using Win32 functions in Visual FoxPro Image Gallery
Terminal Services
..msdn
WTSCloseServer
WTSEnumerateProcesses
WTSEnumerateServers
WTSEnumerateSessions
WTSFreeMemory
WTSOpenServer
WTSQuerySessionInformation
WTSRegisterSessionNotification
WTSSendMessage
WTSUnRegisterSessionNotification
Code examples:
Locking the workstation
Locking the workstation

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
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 name:
  Password:
 
 
  Forgot your password?
 
  Sign up for
the Membership
 
 


User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
3225 bytes  
Created: 2002-04-16 22:24:46  
Modified: 2009-02-02 10:19:34  
Visits in 7 days: 100  
Listed functions:
GetLastError
GetWindowLong
LockWorkStation
WTSRegisterSessionNotification
WTSUnRegisterSessionNotification
Printer friendly API declarations
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.76.170)
3 sec.Function: 'SetSysColors'
Function group: 'System Information'
6 sec.Example: 'Using Month Calendar Control (VFP9, Comctl32.dll)'
3.83 hrs.Example: 'Enumerating forms supported by a specified printer'
10.05 hrs.Function: 'GetPriorityClipboardFormat'
Function group: 'Clipboard'
15.42 hrs.Function: 'ClientToScreen'
Function group: 'Coordinate Space and Transformation'
17.95 hrs.Function: 'GetACP'
Function group: 'National Language Support'
 Example: 'Opening access to the Microsoft Internet functions for the application'
18.3 hrs.Example: 'Retrieving local computer and user names'
 Example: 'Storing screen shot of a form to enhanced metafile (*.emf)'
1 day(s)Example: 'How to display a user-defined icon in the MessageBox dialog'
Google
Advertise here!