Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Which event occurs when user presses Ctrl+Alt+Del and then "Lock Computer"?

Which event occurs when user presses Ctrl+Alt+Del and then "Lock Computer"?

Scheduled Pinned Locked Moved C / C++ / MFC
c++securityhelptutorialquestion
10 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amarelia
    wrote on last edited by
    #1

    Hi I have a dialog based MFC application in which I want to handle an event which occurs when user presses Ctrl+Alt+Del and from Windows Security dialog it select "Lock Computer" button and it locks the computer. I want to know which event occurs and how to trap this event? Any help would be strongly appreciated. Mahesh

    J D G 3 Replies Last reply
    0
    • A Amarelia

      Hi I have a dialog based MFC application in which I want to handle an event which occurs when user presses Ctrl+Alt+Del and from Windows Security dialog it select "Lock Computer" button and it locks the computer. I want to know which event occurs and how to trap this event? Any help would be strongly appreciated. Mahesh

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      IIRC, you cannot "trap" the SAS (CTRL-ALT-DEL) due to security reasons.    I am not sure if applications can register (or receive) notification that the system has been locked.    You can also see an earlier post I made about Desktops in http://www.codeproject.com/script/comments/forums.asp?msg=1362087&forumid=1647#xx1362087xx[^].    Peace! -=- James


      If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      DeleteFXPFiles & CheckFavorites (Please rate this post!)

      1 Reply Last reply
      0
      • A Amarelia

        Hi I have a dialog based MFC application in which I want to handle an event which occurs when user presses Ctrl+Alt+Del and from Windows Security dialog it select "Lock Computer" button and it locks the computer. I want to know which event occurs and how to trap this event? Any help would be strongly appreciated. Mahesh

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Receiving notice when Ctrl+Alt+Del has been pressed will require your own GINA DLL. However, whenever the computer has been locked, see ISensLogon::DisplayLock().


        "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

        A 1 Reply Last reply
        0
        • D David Crow

          Receiving notice when Ctrl+Alt+Del has been pressed will require your own GINA DLL. However, whenever the computer has been locked, see ISensLogon::DisplayLock().


          "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

          A Offline
          A Offline
          Amarelia
          wrote on last edited by
          #4

          Hi David... Thankx a lot for giving some time to my problem Isn't there any such message which we receive when it locks computer by pressing "Lock Computer" button. Like we receive "WM_QUERYENDSESSION" when it goes logoff event or shutdown event. Mahesh

          D 1 Reply Last reply
          0
          • A Amarelia

            Hi David... Thankx a lot for giving some time to my problem Isn't there any such message which we receive when it locks computer by pressing "Lock Computer" button. Like we receive "WM_QUERYENDSESSION" when it goes logoff event or shutdown event. Mahesh

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Amarelia wrote:

            Isn't there any such message which we receive when it locks computer by pressing "Lock Computer" button.

            Perhaps, but I'm unaware of what it might be.


            "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

            G 1 Reply Last reply
            0
            • A Amarelia

              Hi I have a dialog based MFC application in which I want to handle an event which occurs when user presses Ctrl+Alt+Del and from Windows Security dialog it select "Lock Computer" button and it locks the computer. I want to know which event occurs and how to trap this event? Any help would be strongly appreciated. Mahesh

              G Offline
              G Offline
              Gavin Taylor
              wrote on last edited by
              #6

              If you want to receive a notification about when the window station switches between locked states checkout the WTSRegisterSessionNotification[^] API, using it you can receive a WM_WTSSESSION_CHANGE message. Gavin Taylor w: http://www.gavspace.com

              A 1 Reply Last reply
              0
              • D David Crow

                Amarelia wrote:

                Isn't there any such message which we receive when it locks computer by pressing "Lock Computer" button.

                Perhaps, but I'm unaware of what it might be.


                "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

                G Offline
                G Offline
                Gavin Taylor
                wrote on last edited by
                #7

                Checkout WTSRegisterSessionNotification[^] Gavin Taylor w: http://www.gavspace.com

                D 1 Reply Last reply
                0
                • G Gavin Taylor

                  Checkout WTSRegisterSessionNotification[^] Gavin Taylor w: http://www.gavspace.com

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  This seems like a Terminal Services solution, rather than a general-purpose one. Yes?


                  "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

                  G 1 Reply Last reply
                  0
                  • D David Crow

                    This seems like a Terminal Services solution, rather than a general-purpose one. Yes?


                    "The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli

                    G Offline
                    G Offline
                    Gavin Taylor
                    wrote on last edited by
                    #9

                    Windows XP actually uses a dumbed down version of Terminal Services (for fast user switching / remote desktop, etc), I just tried it to double check myself and it does work. Gavin Taylor w: http://www.gavspace.com

                    1 Reply Last reply
                    0
                    • G Gavin Taylor

                      If you want to receive a notification about when the window station switches between locked states checkout the WTSRegisterSessionNotification[^] API, using it you can receive a WM_WTSSESSION_CHANGE message. Gavin Taylor w: http://www.gavspace.com

                      A Offline
                      A Offline
                      Amarelia
                      wrote on last edited by
                      #10

                      Hi Gavin Thaknx a lot for u'r kind support. But this works in Windows Server 2003 and Windows VISTA only. I need solution for Windows 2000 Professional. Is there any such another functions or something like that? Mahesh

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups