User32LockWorkStation Method
Locks the workstation's display.
Locking a workstation protects it from unauthorized use.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll")]
public static bool LockWorkStation()
<DllImportAttribute("User32.dll">]
Public Shared Function LockWorkStation As Boolean
Dim returnValue As Boolean
returnValue = User32.LockWorkStation()
public:
[DllImportAttribute(L"User32.dll")]
static bool LockWorkStation()
[<DllImportAttribute("User32.dll")>]
static member LockWorkStation : unit -> bool
No code example is currently available or this language may not be supported.
Return Value
Boolean
If the function succeeds, the return value is
.
Because the function executes asynchronously,
a
return value indicates that the operation has been initiated;
It does not indicate whether the workstation has been successfully locked.
If the function fails, the return value is
.