mirror of
https://github.com/janbodnar/Windows-API-examples.git
synced 2024-11-24 11:25:30 +00:00
Create lock_workstation.c
This commit is contained in:
parent
d07744be62
commit
220f68b976
17
system/lock_workstation.c
Normal file
17
system/lock_workstation.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include <windows.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#pragma comment(lib, "user32.lib")
|
||||
|
||||
int wmain(void) {
|
||||
|
||||
int r = LockWorkStation();
|
||||
|
||||
if( r == 0 ) {
|
||||
|
||||
wprintf(L"LockWorkStation() failed %d\n", GetLastError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user