@msdn=https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-lockworkstation @pinvoke=http://pinvoke.net/$$$.htm Summary: The LockWorkStation locks the workstation's display. Locking a workstation protects it from unauthorized use. !!!!C# Signature: [DllImport("user32.dll", SetLastError = true)] static extern bool LockWorkStation(); !!!!VB Signature: <DllImport("user32.dll", SetLastError:=True)> _ Public Shared Function LockWorkStation() As Boolean End Function !!!!User-Defined Types: None. !!!!Notes: LockWorkStation uses LastError !!!!Sample Code: void LockWorkStationSafe() { bool result = LockWorkStation(); if( result == false ) { // An error occured throw new Win32Exception( Marshal.GetLastWin32Error() ); } } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: LockWorkStation@msdn on MSDN
Edit user32.LockWorkSt...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.