Windows-API-examples/system/lock_workstation.c
2016-01-31 13:53:14 +01:00

18 lines
258 B
C

#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;
}