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 !!!