Device Manage for OS/2

DevCon for OS/2 - Developer Connection

Operating systems:
ArcaOS, eComStation, IBM OS/2 Warp
eComStation myths 

(Unsorted)  
 
 
Compilers  
 
 
Tools  
 
 
REXX  
 
 
Drivers/kernel  
 
 

 

 

WinCancelShutdown

function cancels a request for an application to [[shutdown|shut down]].

#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, Also in COMMON section */
#include 

HMQ     hmq;            /*  Handle of message queue for current thread. */
BOOL    fCancelAlways;  /*  Cancellation control. */
BOOL    rc;             /*  Success indicator. */

rc = WinCancelShutdown(hmq, fCancelAlways);

Parameters

hmq (HMQ) - input. Handle of message queue for current thread. 
fCancelAlways (BOOL) - input. Cancellation control. 
  TRUE   No WM_QUIT message should be placed on this queue during system shutdown. 
  FALSE  The applications ignore any outstanding WM_QUIT messages already sent to it, but a message should be sent during other system shutdowns. 

Returns

 rc (BOOL) Success indicator. 
    TRUE  Successful completion 
    FALSE  Error occurred. 

Notes

On a system shutdown, each message queue is normally posted a WM_QUIT message. An application can handle this message in one of two ways:

  • Destroy its message queue using [[WinDestroyMsgQueue]] (hmq) or,
  • Call [[WinCancelShutdown]](hmq, FALSE)
Either way the system can proceed to the next queue. If the application determines that it never wants a message queue to receive a [[WM_QUIT]] message as a result of a system shutdown, it should call WinCancelShutdown (hmq, TRUE), typically right after creating the message queue.

 


 

(C) OS2.GURU 2001-2024