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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Sending ALT+CTRL+DEL to the system

Sending ALT+CTRL+DEL to the system

Scheduled Pinned Locked Moved C / C++ / MFC
question
5 Posts 2 Posters 0 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.
  • V Offline
    V Offline
    Vijay S
    wrote on last edited by
    #1

    Hi, I want to send the keyboard message of ALT+CTRL+DEL to the system and Lock the computer programatically. I have tried the functions SendInput() and keybd_event() functions but they fail to send to this combination of key strokes while they send all other combinations of Keys inputs. Could anybody suggest me a way out? Thanks Vijay :) Vijay S

    Z 1 Reply Last reply
    0
    • V Vijay S

      Hi, I want to send the keyboard message of ALT+CTRL+DEL to the system and Lock the computer programatically. I have tried the functions SendInput() and keybd_event() functions but they fail to send to this combination of key strokes while they send all other combinations of Keys inputs. Could anybody suggest me a way out? Thanks Vijay :) Vijay S

      Z Offline
      Z Offline
      Zoltan Csizmadia
      wrote on last edited by
      #2

      Use BOOL LockWorkStation(VOID); Windows NT: Requires version 5.0 or later. Zolee

      V 1 Reply Last reply
      0
      • Z Zoltan Csizmadia

        Use BOOL LockWorkStation(VOID); Windows NT: Requires version 5.0 or later. Zolee

        V Offline
        V Offline
        Vijay S
        wrote on last edited by
        #3

        Thanks Zoltan for your reply . But I am having a peculiar problem . I am not able to use the Function LockWorkStation(). I have included the file Windows.h and I am working on Windows 2000 Advanced Server. Still my code is not able to compile saying that the function is an undeclared identifier. In fact I am successfully able to use other similar functions like ExitWindows() etc. I even opened the Winuser.h (which is included in Windows.h and the function definition is there. I even tried it on other computers but the same result.?? And believe me I am not making a spelling mistake. If only you could make something out of it. :(( Vijay S

        Z V 2 Replies Last reply
        0
        • V Vijay S

          Thanks Zoltan for your reply . But I am having a peculiar problem . I am not able to use the Function LockWorkStation(). I have included the file Windows.h and I am working on Windows 2000 Advanced Server. Still my code is not able to compile saying that the function is an undeclared identifier. In fact I am successfully able to use other similar functions like ExitWindows() etc. I even opened the Winuser.h (which is included in Windows.h and the function definition is there. I even tried it on other computers but the same result.?? And believe me I am not making a spelling mistake. If only you could make something out of it. :(( Vijay S

          Z Offline
          Z Offline
          Zoltan Csizmadia
          wrote on last edited by
          #4

          You have to define _WIN32_WINNT = 0x0500 in the project settings. Go to project setting and this to the preprocessor definitions: _WIN32_WINNT=0x500 This will mean your code is for Win2000/XP Zolee

          1 Reply Last reply
          0
          • V Vijay S

            Thanks Zoltan for your reply . But I am having a peculiar problem . I am not able to use the Function LockWorkStation(). I have included the file Windows.h and I am working on Windows 2000 Advanced Server. Still my code is not able to compile saying that the function is an undeclared identifier. In fact I am successfully able to use other similar functions like ExitWindows() etc. I even opened the Winuser.h (which is included in Windows.h and the function definition is there. I even tried it on other computers but the same result.?? And believe me I am not making a spelling mistake. If only you could make something out of it. :(( Vijay S

            V Offline
            V Offline
            Vijay S
            wrote on last edited by
            #5

            Thanks , I got the answer . I had to define _WIN32_WINNT as 0x0500 in order to use this function as it is defined in this section of Winuser.h Thanks :) Vijay S

            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