Detect Log Off or Shut Down process (XP)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason S

    #1

    Detect Log Off or Shut Down process (XP)

    Hi there,

    I created a simple VB app that runs in the background that I now need to
    detect when Windows (XP with SP2) is just about to Shut Down OR the user is
    Logging Off. Is this possible?
    I require my app to either pause the shutdown/log-off process for a few
    seconds whilst it does something important (it's a security thing). As soon
    as its finished, Windows should resume logging off the user and/or shutting
    down.
    Thanks in advance.

    Jason.


  • Dean Earley

    #2
    Re: Detect Log Off or Shut Down process (XP)

    Jason S wrote:[color=blue]
    > Hi there,
    >
    > I created a simple VB app that runs in the background that I now need to
    > detect when Windows (XP with SP2) is just about to Shut Down OR the user is
    > Logging Off. Is this possible?
    > I require my app to either pause the shutdown/log-off process for a few
    > seconds whilst it does something important (it's a security thing). As soon
    > as its finished, Windows should resume logging off the user and/or shutting
    > down.[/color]

    Just do it in the shutdown code of your app?
    Windows will wait patiently (up to a point) for your app to finish.
    The QueryUnload event will tell you why its shutting down.

    --
    Dean Earley (dean.earley@ic ode.co.uk)
    i-Catcher Development Team

    iCode Systems

    Comment

    • Jason S

      #3
      Re: Detect Log Off or Shut Down process (XP)


      "Dean Earley" <dean.earley@ic ode.co.uk> wrote in message
      news:43f5c7fe$0 $5002$db0fefd9@ news.zen.co.uk. ..[color=blue]
      > Jason S wrote:[color=green]
      >> Hi there,
      >>
      >> I created a simple VB app that runs in the background that I now need to
      >> detect when Windows (XP with SP2) is just about to Shut Down OR the user
      >> is Logging Off. Is this possible?
      >> I require my app to either pause the shutdown/log-off process for a few
      >> seconds whilst it does something important (it's a security thing). As
      >> soon as its finished, Windows should resume logging off the user and/or
      >> shutting down.[/color]
      >
      > Just do it in the shutdown code of your app?
      > Windows will wait patiently (up to a point) for your app to finish.
      > The QueryUnload event will tell you why its shutting down.
      >
      > --
      > Dean Earley (dean.earley@ic ode.co.uk)
      > i-Catcher Development Team
      >
      > iCode Systems[/color]


      Thanks. I never actually sussed out the QueryUnload event to be honest.
      Works! =)

      Jason.


      Comment

      Working...