How to programmaticaly lock devices

// Expert user has replied.
J Juan-Antonio Martinez 3 years 6 months ago
1 1 0

Yes I know that for WM6.5 there is a Aygshell call right for this, SHDeviceLockAndPrompt, but one thing that works for all of the WM lockable devices is simply this:
int WINAPI WinMain( HINSTANCE hInstance,      HINSTANCE hPrevInstance,      LPTSTR    lpCmdLine,      int       nCmdShow) {  keybd_event(VK_F22, 0, 0, 0);  keybd_event(VK_F22, 0, KEYEVENTF_KEYUP, 0);

 return 0; }
I hope this helps!

Please Register or Login to post a reply

1 Replies

K Kjell Lloyd

Thanks for sharing! :)

CONTACT
Can’t find what you’re looking for?