Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PowerClearRequest function

Decrements the count of power requests of the specified type for a power request object.

Syntax


BOOL PowerClearRequest(
  _In_  HANDLE PowerRequest,
  _In_  POWER_REQUEST_TYPE RequestType
);

Parameters

PowerRequest [in]

A handle to a power request object.

RequestType [in]

The power request type to be decremented. This parameter can be one of the following values.

ValueMeaning
PowerRequestDisplayRequired

The display remains on even if there is no user input for an extended period of time.

PowerRequestSystemRequired

The system continues to run instead of entering sleep after a period of user inactivity.

PowerRequestAwayModeRequired

The system enters away mode instead of sleep. In away mode, the system continues to run but turns off audio and video to give the appearance of sleep.

PowerRequestExecutionRequired

The calling process continues to run instead of being suspended or terminated by process lifetime management mechanisms. When and how long the process is allowed to run depends on the operating system and power policy settings.

When a PowerRequestExecutionRequired request is active, it implies PowerRequestSystemRequired.

The PowerRequestExecutionRequired request type can be used only by applications. Services cannot use this request type.

Windows 7 and Windows Server 2008 R2:  This request type is supported starting with Windows 8 and Windows Server 2012.

 

Return value

If the function succeeds, it returns a nonzero value.

If the function fails, it returns zero. To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

PowerCreateRequest
PowerSetRequest

 

 

Community Additions

Show:
© 2014 Microsoft