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. API to capture Login event

API to capture Login event

Scheduled Pinned Locked Moved C / C++ / MFC
c++jsonannouncement
3 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.
  • R Offline
    R Offline
    rohit dhamija 0
    wrote on last edited by
    #1

    Dear all, I am developing an application using MFC VC++ Version 6.0 for Windows 2000. I need to capture login and log off event in my application. Is there any event (or API) to capture these events Thanks rohit:-O

    M 1 Reply Last reply
    0
    • R rohit dhamija 0

      Dear all, I am developing an application using MFC VC++ Version 6.0 for Windows 2000. I need to capture login and log off event in my application. Is there any event (or API) to capture these events Thanks rohit:-O

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      If your application is an ordinary application, it will be terminated when the user logs off, because Windows tears down the session. Windows sends a WM_QUERYENDSESSION message, followed by a WM_ENDSESSION message, when the user logs off or shuts down the system. See the documentation for the exact semantics. If you're trying to handle user switches on Windows XP, see the KB article HOW TO: Write an Application That Supports Fast User Switching in Windows XP[^]. (edited for formatting)

      R 1 Reply Last reply
      0
      • M Mike Dimmick

        If your application is an ordinary application, it will be terminated when the user logs off, because Windows tears down the session. Windows sends a WM_QUERYENDSESSION message, followed by a WM_ENDSESSION message, when the user logs off or shuts down the system. See the documentation for the exact semantics. If you're trying to handle user switches on Windows XP, see the KB article HOW TO: Write an Application That Supports Fast User Switching in Windows XP[^]. (edited for formatting)

        R Offline
        R Offline
        rohit dhamija 0
        wrote on last edited by
        #3

        Thanks mike you solved my purpose:-O

        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