1 /*++ NDK Version: 0098 2 3 Copyright (c) Alex Ionescu. All rights reserved. 4 5 Header Name: 6 7 pofuncs.h 8 9 Abstract: 10 11 Function definitions for the Power Subsystem. 12 13 Author: 14 15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006 16 17 --*/ 18 19 #ifndef _POFUNCS_H 20 #define _POFUNCS_H 21 #ifndef _PO_DDK_ 22 23 // 24 // Dependencies 25 // 26 #include <umtypes.h> 27 28 // 29 // Native Calls 30 // 31 NTSYSCALLAPI 32 NTSTATUS 33 NTAPI 34 NtInitiatePowerAction( 35 _In_ POWER_ACTION SystemAction, 36 _In_ SYSTEM_POWER_STATE MinSystemState, 37 _In_ ULONG Flags, 38 _In_ BOOLEAN Asynchronous 39 ); 40 41 NTSYSCALLAPI 42 NTSTATUS 43 NTAPI 44 NtPowerInformation( 45 _In_ POWER_INFORMATION_LEVEL PowerInformationLevel, 46 _In_bytecount_(InputBufferLength) PVOID InputBuffer, 47 _In_ ULONG InputBufferLength, 48 _Out_bytecap_(OutputBufferLength) PVOID OutputBuffer, 49 _In_ ULONG OutputBufferLength 50 ); 51 52 NTSYSCALLAPI 53 NTSTATUS 54 NTAPI 55 NtSetSystemPowerState( 56 _In_ POWER_ACTION SystemAction, 57 _In_ SYSTEM_POWER_STATE MinSystemState, 58 _In_ ULONG Flags 59 ); 60 61 NTSYSCALLAPI 62 NTSTATUS 63 NTAPI 64 NtGetDevicePowerState( 65 _In_ HANDLE Device, 66 _In_ PDEVICE_POWER_STATE PowerState 67 ); 68 69 NTSYSCALLAPI 70 NTSTATUS 71 NTAPI 72 NtRequestWakeupLatency( 73 _In_ LATENCY_TIME latency 74 ); 75 76 NTSYSCALLAPI 77 BOOLEAN 78 NTAPI 79 NtIsSystemResumeAutomatic(VOID); 80 81 NTSYSCALLAPI 82 NTSTATUS 83 NTAPI 84 NtSetThreadExecutionState( 85 _In_ EXECUTION_STATE esFlags, 86 _Out_ EXECUTION_STATE *PreviousFlags 87 ); 88 89 NTSYSCALLAPI 90 NTSTATUS 91 NTAPI 92 NtInitiatePowerAction( 93 _In_ POWER_ACTION SystemAction, 94 _In_ SYSTEM_POWER_STATE MinSystemState, 95 _In_ ULONG Flags, 96 _In_ BOOLEAN Asynchronous 97 ); 98 99 NTSYSCALLAPI 100 NTSTATUS 101 NTAPI 102 NtRequestDeviceWakeup( 103 _In_ HANDLE Device 104 ); 105 106 NTSYSCALLAPI 107 NTSTATUS 108 NTAPI 109 NtCancelDeviceWakeupRequest( 110 _In_ HANDLE Device 111 ); 112 #endif 113 114 NTSYSAPI 115 NTSTATUS 116 NTAPI 117 ZwInitiatePowerAction( 118 _In_ POWER_ACTION SystemAction, 119 _In_ SYSTEM_POWER_STATE MinSystemState, 120 _In_ ULONG Flags, 121 _In_ BOOLEAN Asynchronous 122 ); 123 124 _IRQL_requires_max_(PASSIVE_LEVEL) 125 NTSYSAPI 126 NTSTATUS 127 NTAPI 128 ZwPowerInformation( 129 _In_ POWER_INFORMATION_LEVEL InformationLevel, 130 _In_reads_bytes_opt_(InputBufferLength) PVOID InputBuffer, 131 _In_ ULONG InputBufferLength, 132 _Out_writes_bytes_opt_(OutputBufferLength) PVOID OutputBuffer, 133 _In_ ULONG OutputBufferLength 134 ); 135 136 NTSYSCALLAPI 137 NTSTATUS 138 NTAPI 139 ZwSetSystemPowerState( 140 _In_ POWER_ACTION SystemAction, 141 _In_ SYSTEM_POWER_STATE MinSystemState, 142 _In_ ULONG Flags 143 ); 144 #endif 145