CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    2

    Porting From SUN????

    I am currently porting some server C-code from a SUN machine to NT. This code in not a GUI and I would like to keep it as C-code. On the SUN machine it users signals to determine when the machine is being booted, and the program will stop gracefully! Looks like I should use the NT message queue, but I am having no luck. I tried peekmessage() but it doesn't seem to trap the boot message "wm_queryendsession". Is this the right approach?

    Thanks,
    Dan Gray
    [email protected]




  2. #2
    Join Date
    Apr 1999
    Posts
    15

    Re: Porting From SUN????

    Use SetConsoleCtrlHandler(...) and you will be able to intercept CTRL_C_EVENT, CTRL_BREAK_EVENT, CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT, and CTRL_SHUTDOWN_EVENT.

    Success !
    [email protected]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured