This function is called by the model device driver to notify the platform-dependent driver that the platform is about to enter suspend mode.
BOOL HWPowerOff( PVOID pContext );
TRUE indicates success. FALSE indicates failure.
This function is called when the device is turned off. Because this call is without standard process/thread context, take care in writing this function. No DLLs or system calls, such as Sleep, can be used. This function saves its state to local storage, and then returns. As with all power-down handlers, this function cannot call functions in other DLLs, memory allocators, debugging-output functions, or do anything that could cause a page fault.
This function is part of the implementation of the PDDs of serial port drivers. This function is defined in the header file SerHW.h, and is available in Windows CE version 1.0 and later.