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. Database & SysAdmin
  3. System Admin
  4. How to signal a system port when windows 2000 has shutdown ?

How to signal a system port when windows 2000 has shutdown ?

Scheduled Pinned Locked Moved System Admin
comtutorialquestion
4 Posts 3 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.
  • M Offline
    M Offline
    MickeM
    wrote on last edited by
    #1

    Hi, I was recently involved in a project where we wrote a simple program that listend to a signal on a port (COM/LPT) and on that signal it shutdown windows and after shutting down it sent back a signal letting the system know things went well. Now I have been asked if this could be done with windows 2000 (/xp) and have been contemplating various ways to achive this. But I cant find any information on how to acchive the "power down OK signal" that is soposed to be sent after windows has shutdown. Does anyone know how this could be achived ? (in a simple fashion, I mean writing my own HAL isn't something Im about to do) And is there someone who might know, ie. does Microsoft have anyone I can ask ? // MickeM

    A 1 Reply Last reply
    0
    • M MickeM

      Hi, I was recently involved in a project where we wrote a simple program that listend to a signal on a port (COM/LPT) and on that signal it shutdown windows and after shutting down it sent back a signal letting the system know things went well. Now I have been asked if this could be done with windows 2000 (/xp) and have been contemplating various ways to achive this. But I cant find any information on how to acchive the "power down OK signal" that is soposed to be sent after windows has shutdown. Does anyone know how this could be achived ? (in a simple fashion, I mean writing my own HAL isn't something Im about to do) And is there someone who might know, ie. does Microsoft have anyone I can ask ? // MickeM

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      If I understand you correct, then, when Windows Starts up again you wanna send a signal through the port. Is that right? You can read the last date/time, where windows were shutting down, in the eventlog, you can also read when it was started again. You can calculate everything needed about shutdowns/boots/uptime from the data in the eventlog... - Anders Money talks, but all mine ever says is "Goodbye!"

      M 1 Reply Last reply
      0
      • A Anders Molin

        If I understand you correct, then, when Windows Starts up again you wanna send a signal through the port. Is that right? You can read the last date/time, where windows were shutting down, in the eventlog, you can also read when it was started again. You can calculate everything needed about shutdowns/boots/uptime from the data in the eventlog... - Anders Money talks, but all mine ever says is "Goodbye!"

        M Offline
        M Offline
        MickeM
        wrote on last edited by
        #3

        No, it is when windows *has* shutdown. Its a bit like ATX power, I want to as the last code executetd in windows (or as late as posible) tell the widget connected to the poert that "windows is now shutdown"... // MickeM

        V 1 Reply Last reply
        0
        • M MickeM

          No, it is when windows *has* shutdown. Its a bit like ATX power, I want to as the last code executetd in windows (or as late as posible) tell the widget connected to the poert that "windows is now shutdown"... // MickeM

          V Offline
          V Offline
          Venet
          wrote on last edited by
          #4

          Is it important that your app be closed last ? You can detect Windows Shutdown, if you listen for WM_QUERYENDSESSION and act as appropriate. Is this what you need ? Regards, Venet. Donec eris felix, multos numerabis amicos.

          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