|
-
July 18th, 2002, 10:12 AM
#1
Inserting A Ctrl+alt+del Combination In The System Message Queue
I need to simulate a CTRL+ALT+DEL keyboard sequence from an application for rebooting purposes. I'm doing this because the API LockWorkStation() is working only for the WIN 2K.
I tried this code:
keybd_event(VK_CONTROL,0,0,0);
keybd_event(VK_MENU,0,0,0);
keybd_event(VK_DELETE,0,0,0);
keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0);
keybd_event(VK_MENU,0,KEYEVENTF_KEYUP,0);
keybd_event(VK_DELETE,0,KEYEVENTF_KEYUP,0);
It seem that the code is not working. Anybody has an idea why ... ??? If U know some useful articles to read or have an idea , please give me a sign.
I will reward the good answers !!!
-
July 18th, 2002, 10:34 AM
#2
Code:
ExitWindowsEx(EWX_REBOOT | EWX_FORCE, 0);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|