Partager via


HWPowerOff (Windows Embedded CE 6.0)

1/6/2010

This function notifies the platform-dependent driver that the hardware platform is about to enter suspend mode. The model device driver (MDD) calls this function.

Syntax

BOOL HWPowerOff(
  PVOID pContext 
);

Parameters

  • pContext
    [in] Pointer to a context structure returned by the HWInit function that contains implementation-specific data describing the device.

Return Value

TRUE indicates success. FALSE indicates failure.

Remarks

This function is called when the device is turned off. Because this call is without a standard process and thread context, be careful when writing this function. Do not use any DLLs or system calls, such as Sleep. 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, or debugging output functions, nor can it perform actions that could cause a page fault.

This function supports the implementation of the lower layers of serial port drivers.

Requirements

Header serhw.h
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Serial Port Driver PDD Functions
HWInit