Click here to Skip to main content
Licence 
First Posted 20 Jan 2003
Views 131,657
Bookmarked 26 times

Simulate Alt+Control+delete

By | 20 Jan 2003 | Article
How to Simulate Alt+Control+delete

Introduction

Simulate alt control delete command in windows nt, 2k, xp.
    hwinsta = OpenWindowStation("winsta0", FALSE,
                              WINSTA_ACCESSCLIPBOARD   |
                              WINSTA_ACCESSGLOBALATOMS |
                              WINSTA_CREATEDESKTOP     |
                              WINSTA_ENUMDESKTOPS      |
                              WINSTA_ENUMERATE         |
                              WINSTA_EXITWINDOWS       |
                              WINSTA_READATTRIBUTES    |
                              WINSTA_READSCREEN        |
                              WINSTA_WRITEATTRIBUTES);
    if (hwinsta == NULL)
        return FALSE;
    // 
    // Set the windowstation to be winsta0
    // 
    if (!SetProcessWindowStation(hwinsta))
     return FALSE;

    // 
    // Get the default desktop on winsta0
    // 
    hdesk = OpenDesktop("Winlogon", 0, FALSE,
                        DESKTOP_CREATEMENU |
              DESKTOP_CREATEWINDOW |
                        DESKTOP_ENUMERATE    |
                        DESKTOP_HOOKCONTROL  |
                        DESKTOP_JOURNALPLAYBACK |
                        DESKTOP_JOURNALRECORD |
                        DESKTOP_READOBJECTS |
                        DESKTOP_SWITCHDESKTOP |
                        DESKTOP_WRITEOBJECTS);
    if (hdesk == NULL)
       return FALSE;

    // 
    // Set the desktop to be "default"
    // 
    if (!SetThreadDesktop(hdesk))
       return FALSE;
    PostMessage(HWND_BROADCAST,WM_HOTKEY,0,
        MAKELPARAM(MOD_ALT|MOD_CONTROL,VK_DELETE));

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Sukanta Kumar Dash

Web Developer

United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralIt does not work on Vista PinmemberRonakkumar Patel13:27 18 Dec '07  
GeneralRe: It does not work on Vista Pinmemberppckiller3:50 10 Jan '08  
AnswerRe: It does not work on Vista PinmemberDecipator3:15 29 Jun '09  
GeneralRe: It does not work on Vista Pinmemberjapp272:43 15 Sep '10  
QuestionIt is not working on WinXP SP2 Pinmemberkoldovsky8:24 21 Feb '07  
AnswerRe: It is not working on WinXP SP2 Pinmembermd.ikra0:54 29 Jul '07  
QuestionExcellent for Admin with 300 computers to ctrl alt del at the same time ! Pinmembermd.ikra19:51 28 Jan '07  
AnswerRe: Excellent for Admin with 300 computers to ctrl alt del at the same time ! PinmemberMDKing834:56 11 Jul '08  
QuestionSend Mouse Clicks & Other KeyStrokes PinmemberDeepak Sakpal7:30 25 Aug '06  
AnswerRe: Send Mouse Clicks & Other KeyStrokes PinmemberMDKing834:57 11 Jul '08  
Generalit can not work ! Pinmembercharlie79082:01 22 Aug '06  
Generalit wasn't work Pinmemberbrs_jom7:51 19 Jan '06  
GeneralRe: it wasn't work Pinmemberantifumo8:34 2 Feb '06  
GeneralRe: it wasn't work Pinmembermidea09785:02 19 Aug '06  
GeneralI got Access Denied when call OpenDesktop PinmemberYulaw20:32 21 Aug '05  
GeneralJust DOESN'T work Pinmembersk19650:53 15 Feb '05  
GeneralNext step to unlock screen Pinmemberanthonyx264:22 18 Nov '04  
GeneralSimulate Alt+Control+delete in Activex Pinmembersankul99921:05 11 Oct '04  
Questionaltctrldel.exe can't use in winxp??? Pinmembernetsh14:59 25 Jul '04  
QuestionCan't run in win200, why? Pinmemberyinju7:29 14 Apr '04  
AnswerRe: Can't run in win200, why? PinmemberDavidR_r9:23 2 Jul '04  
GeneralSetThreadDesktop Pinmemberpaulashford23:56 25 Feb '04  
GeneralRe: SetThreadDesktop Pinmemberplanets6:17 23 Mar '04  
Questionwhat about to deactivate these keys? PinsussDr.Lutfi3:21 16 Aug '03  
QuestionAnd what about simulating ALT + TAB ? PinmemberJL0027:05 18 Jul '03  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 21 Jan 2003
Article Copyright 2003 by Sukanta Kumar Dash
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid