My Computer Programs

(C++ Win32) LockScreen

steloflute 2012. 7. 11. 10:12

https://github.com/kimtg/LockScreen

 

Turns off the monitor and locks the screen

모니터 끄고 컴퓨터 잠그기

 

#include <windows.h>

int APIENTRY WinMain(HINSTANCE hInstance,
 HINSTANCE hPrevInstance,
 LPSTR    lpCmdLine,
 int       nCmdShow) {

 LockWorkStation();
 // Turn off monitor
 SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);

 return 0;
}

 

LockScreen.exe

 

 

 

 

'My Computer Programs' 카테고리의 다른 글

Javascript Interpreter  (0) 2012.07.28
(bash) triangle  (0) 2012.07.24
(Windows) 컴퓨터 잠금  (0) 2012.06.27
(C++ Win32) MonitorOff  (0) 2012.06.26
Site Block: Web site blocker  (0) 2012.06.14