PowerCreateRequest function
Creates a new power request object.
Syntax
HANDLE PowerCreateRequest( _In_ PREASON_CONTEXT Context );
Parameters
- Context [in]
-
Points to a REASON_CONTEXT structure that contains information about the power request.
Return value
If the function succeeds, the return value is a handle to the power request object.
If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
Remarks
When the power request object is no longer needed, use the CloseHandle function to free the handle and clean up the object.
Requirements
|
Minimum supported client |
Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also