-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpofuncs.h
159 lines (134 loc) · 2.74 KB
/
pofuncs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
pofuncs.h
Abstract:
Function definitions for the Power Subsystem.
Author:
Alex Ionescu ([email protected]) - Updated - 27-Feb-2006
--*/
#ifndef _POFUNCS_H
#define _POFUNCS_H
#ifndef _PO_DDK_
//
// Dependencies
//
#include <..\ndk\umtypes.h>
//
// Native Calls
//
NTSYSCALLAPI
NTSTATUS
NTAPI
NtInitiatePowerAction(
_In_ POWER_ACTION SystemAction,
_In_ SYSTEM_POWER_STATE MinSystemState,
_In_ ULONG Flags,
_In_ BOOLEAN Asynchronous
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtPowerInformation(
_In_ POWER_INFORMATION_LEVEL PowerInformationLevel,
_In_bytecount_(InputBufferLength) PVOID InputBuffer,
_In_ ULONG InputBufferLength,
_Out_bytecap_(OutputBufferLength) PVOID OutputBuffer,
_In_ ULONG OutputBufferLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetSystemPowerState(
_In_ POWER_ACTION SystemAction,
_In_ SYSTEM_POWER_STATE MinSystemState,
_In_ ULONG Flags
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtGetDevicePowerState(
_In_ HANDLE Device,
_In_ PDEVICE_POWER_STATE PowerState
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRequestWakeupLatency(
_In_ LATENCY_TIME latency
);
NTSYSCALLAPI
BOOLEAN
NTAPI
NtIsSystemResumeAutomatic(VOID);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetThreadExecutionState(
_In_ EXECUTION_STATE esFlags,
_Out_ EXECUTION_STATE *PreviousFlags
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtInitiatePowerAction(
_In_ POWER_ACTION SystemAction,
_In_ SYSTEM_POWER_STATE MinSystemState,
_In_ ULONG Flags,
_In_ BOOLEAN Asynchronous
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRequestDeviceWakeup(
_In_ HANDLE Device
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCancelDeviceWakeupRequest(
_In_ HANDLE Device
);
#endif
#ifndef NTOS_MODE_USER
typedef VOID(*PPO_COALESCING_CALLBACK) (
_In_ ULONG Reason,
_In_ PDEVICE_OBJECT DeviceObject,
_In_ PVOID Context);
NTSTATUS PoRegisterCoalescingCallback(
_In_ PPO_COALESCING_CALLBACK Callback,
_In_ BOOLEAN ClientOrSrever,
_Out_ PVOID* Handle,
_In_ PVOID Context);
VOID PoUnregisterCoalescingCallback(
_In_ PVOID Handle);
#endif
NTSYSAPI
NTSTATUS
NTAPI
ZwInitiatePowerAction(
_In_ POWER_ACTION SystemAction,
_In_ SYSTEM_POWER_STATE MinSystemState,
_In_ ULONG Flags,
_In_ BOOLEAN Asynchronous
);
_IRQL_requires_max_(PASSIVE_LEVEL)
NTSYSAPI
NTSTATUS
NTAPI
ZwPowerInformation(
_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
);
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwSetSystemPowerState(
_In_ POWER_ACTION SystemAction,
_In_ SYSTEM_POWER_STATE MinSystemState,
_In_ ULONG Flags
);
#endif