2006-05-10 17:47:44 +00:00
|
|
|
/*++ NDK Version: 0098
|
2006-05-05 18:13:26 +00:00
|
|
|
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
|
|
|
|
Header Name:
|
|
|
|
|
|
|
|
pofuncs.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
|
|
|
Function definitions for the Power Subsystem.
|
|
|
|
|
|
|
|
Author:
|
|
|
|
|
2006-05-10 17:47:44 +00:00
|
|
|
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
|
2006-05-05 18:13:26 +00:00
|
|
|
|
|
|
|
--*/
|
|
|
|
|
|
|
|
#ifndef _POFUNCS_H
|
|
|
|
#define _POFUNCS_H
|
2011-07-24 17:06:50 +00:00
|
|
|
#ifndef _PO_DDK_
|
2006-05-05 18:13:26 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Dependencies
|
|
|
|
//
|
|
|
|
#include <umtypes.h>
|
|
|
|
|
|
|
|
//
|
|
|
|
// Native Calls
|
|
|
|
//
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtInitiatePowerAction(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_ACTION SystemAction,
|
|
|
|
_In_ SYSTEM_POWER_STATE MinSystemState,
|
|
|
|
_In_ ULONG Flags,
|
|
|
|
_In_ BOOLEAN Asynchronous
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtPowerInformation(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_INFORMATION_LEVEL PowerInformationLevel,
|
|
|
|
_In_bytecount_(InputBufferLength) PVOID InputBuffer,
|
|
|
|
_In_ ULONG InputBufferLength,
|
|
|
|
_Out_bytecap_(OutputBufferLength) PVOID OutputBuffer,
|
|
|
|
_In_ ULONG OutputBufferLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
NTSYSCALLAPI
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSetSystemPowerState(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_ACTION SystemAction,
|
|
|
|
_In_ SYSTEM_POWER_STATE MinSystemState,
|
|
|
|
_In_ ULONG Flags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtGetDevicePowerState(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE Device,
|
|
|
|
_In_ PDEVICE_POWER_STATE PowerState
|
2011-07-24 16:50:03 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtRequestWakeupLatency(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ LATENCY_TIME latency
|
2011-07-24 16:50:03 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
NtIsSystemResumeAutomatic(VOID);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtSetThreadExecutionState(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ EXECUTION_STATE esFlags,
|
|
|
|
_Out_ EXECUTION_STATE *PreviousFlags
|
2011-07-24 16:50:03 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtInitiatePowerAction(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_ACTION SystemAction,
|
|
|
|
_In_ SYSTEM_POWER_STATE MinSystemState,
|
|
|
|
_In_ ULONG Flags,
|
|
|
|
_In_ BOOLEAN Asynchronous
|
2011-07-24 16:50:03 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtRequestDeviceWakeup(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE Device
|
2011-07-24 16:50:03 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2011-07-24 16:50:03 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
NtCancelDeviceWakeupRequest(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ HANDLE Device
|
2011-07-24 16:50:03 +00:00
|
|
|
);
|
2011-07-24 17:14:58 +00:00
|
|
|
#endif
|
2013-01-13 14:49:21 +00:00
|
|
|
|
|
|
|
NTSYSAPI
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwInitiatePowerAction(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_ACTION SystemAction,
|
|
|
|
_In_ SYSTEM_POWER_STATE MinSystemState,
|
|
|
|
_In_ ULONG Flags,
|
|
|
|
_In_ BOOLEAN Asynchronous
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2013-01-13 14:49:21 +00:00
|
|
|
_IRQL_requires_max_(PASSIVE_LEVEL)
|
|
|
|
NTSYSAPI
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwPowerInformation(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_INFORMATION_LEVEL InformationLevel,
|
|
|
|
_In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer,
|
|
|
|
_In_ ULONG InputBufferLength,
|
|
|
|
_Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer,
|
|
|
|
_In_ ULONG OutputBufferLength
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
|
2011-07-24 17:06:50 +00:00
|
|
|
NTSYSCALLAPI
|
2006-05-05 18:13:26 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
ZwSetSystemPowerState(
|
2013-01-13 14:49:21 +00:00
|
|
|
_In_ POWER_ACTION SystemAction,
|
|
|
|
_In_ SYSTEM_POWER_STATE MinSystemState,
|
|
|
|
_In_ ULONG Flags
|
2006-05-05 18:13:26 +00:00
|
|
|
);
|
|
|
|
#endif
|