ReactOS  r75907
ntpoapi.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  _POWER_STATE
 
struct  BATTERY_REPORTING_SCALE
 
struct  _PROCESSOR_IDLE_TIMES
 
struct  _PROCESSOR_IDLE_HANDLER_INFO
 
struct  _PROCESSOR_STATE_HANDLER
 
struct  _POWER_STATE_HANDLER
 
struct  _POWER_STATE_NOTIFY_HANDLER
 
struct  _PROCESSOR_PERF_LEVEL
 
struct  _PROCESSOR_PERF_STATE
 
struct  _PROCESSOR_STATE_HANDLER2
 
struct  SYSTEM_POWER_CAPABILITIES
 
struct  SYSTEM_BATTERY_STATE
 
struct  _PROCESSOR_POWER_INFORMATION
 
struct  _POWER_ACTION_POLICY
 

Macros

#define _PO_DDK_
 
#define POWER_SYSTEM_MAXIMUM   PowerSystemMaximum
 
#define POWER_PERF_SCALE   100
 
#define PERF_LEVEL_TO_PERCENT(x)   (((x) * 1000) / (POWER_PERF_SCALE * 10))
 
#define PERCENT_TO_PERF_LEVEL(x)   (((x) * POWER_PERF_SCALE * 10) / 1000)
 
#define MAX_IDLE_HANDLERS   3
 
#define PROCESSOR_STATE_TYPE_PERFORMANCE   1
 
#define PROCESSOR_STATE_TYPE_THROTTLE   2
 
#define WINLOGON_LOCK_ON_SLEEP   0x00000001
 
#define POWER_ACTION_QUERY_ALLOWED   0x00000001
 
#define POWER_ACTION_UI_ALLOWED   0x00000002
 
#define POWER_ACTION_OVERRIDE_APPS   0x00000004
 
#define POWER_ACTION_LIGHTEST_FIRST   0x10000000
 
#define POWER_ACTION_LOCK_CONSOLE   0x20000000
 
#define POWER_ACTION_DISABLE_WAKES   0x40000000
 
#define POWER_ACTION_CRITICAL   0x80000000
 
#define POWER_LEVEL_USER_NOTIFY_TEXT   0x00000001
 
#define POWER_LEVEL_USER_NOTIFY_SOUND   0x00000002
 
#define POWER_LEVEL_USER_NOTIFY_EXEC   0x00000004
 
#define POWER_USER_NOTIFY_BUTTON   0x00000008
 
#define POWER_USER_NOTIFY_SHUTDOWN   0x00000010
 
#define POWER_FORCE_TRIGGER_RESET   0x80000000
 
#define DISCHARGE_POLICY_CRITICAL   0
 
#define DISCHARGE_POLICY_LOW   1
 
#define NUM_DISCHARGE_POLICIES   4
 
#define PO_THROTTLE_NONE   0
 
#define PO_THROTTLE_CONSTANT   1
 
#define PO_THROTTLE_DEGRADE   2
 
#define PO_THROTTLE_ADAPTIVE   3
 
#define PO_THROTTLE_MAXIMUM   4
 

Typedefs

typedef enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
 
typedef enum _SYSTEM_POWER_STATEPSYSTEM_POWER_STATE
 
typedef enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
 
typedef enum _DEVICE_POWER_STATEPDEVICE_POWER_STATE
 
typedef union _POWER_STATE POWER_STATE
 
typedef union _POWER_STATEPPOWER_STATE
 
typedef enum _POWER_STATE_TYPE POWER_STATE_TYPE
 
typedef enum _POWER_STATE_TYPEPPOWER_STATE_TYPE
 
typedef enum
_POWER_INFORMATION_LEVEL 
POWER_INFORMATION_LEVEL
 
typedef enum POWER_ACTIONPPOWER_ACTION
 
typedef struct
BATTERY_REPORTING_SCALE
PBATTERY_REPORTING_SCALE
 
typedef struct
_PROCESSOR_IDLE_TIMES 
PROCESSOR_IDLE_TIMES
 
typedef struct
_PROCESSOR_IDLE_TIMES
PPROCESSOR_IDLE_TIMES
 
typedef struct
_PROCESSOR_IDLE_HANDLER_INFO 
PROCESSOR_IDLE_HANDLER_INFO
 
typedef struct
_PROCESSOR_IDLE_HANDLER_INFO
PPROCESSOR_IDLE_HANDLER_INFO
 
typedef VOID(FASTCALLPSET_PROCESSOR_THROTTLE )(IN UCHAR Throttle)
 
typedef NTSTATUS(FASTCALLPSET_PROCESSOR_THROTTLE2 )(IN UCHAR Throttle)
 
typedef struct
_PROCESSOR_STATE_HANDLER 
PROCESSOR_STATE_HANDLER
 
typedef struct
_PROCESSOR_STATE_HANDLER
PPROCESSOR_STATE_HANDLER
 
typedef enum
_POWER_STATE_HANDLER_TYPE 
POWER_STATE_HANDLER_TYPE
 
typedef enum
_POWER_STATE_HANDLER_TYPE
PPOWER_STATE_HANDLER_TYPE
 
typedef struct _POWER_STATE_HANDLER POWER_STATE_HANDLER
 
typedef struct
_POWER_STATE_HANDLER
PPOWER_STATE_HANDLER
 
typedef struct
_POWER_STATE_NOTIFY_HANDLER 
POWER_STATE_NOTIFY_HANDLER
 
typedef struct
_POWER_STATE_NOTIFY_HANDLER
PPOWER_STATE_NOTIFY_HANDLER
 
typedef struct
_PROCESSOR_PERF_LEVEL 
PROCESSOR_PERF_LEVEL
 
typedef struct
_PROCESSOR_PERF_LEVEL
PPROCESSOR_PERF_LEVEL
 
typedef struct
_PROCESSOR_PERF_STATE 
PROCESSOR_PERF_STATE
 
typedef struct
_PROCESSOR_PERF_STATE
PPROCESSOR_PERF_STATE
 
typedef struct
_PROCESSOR_STATE_HANDLER2 
PROCESSOR_STATE_HANDLER2
 
typedef struct
_PROCESSOR_STATE_HANDLER2
PPROCESSOR_STATE_HANDLER2
 
typedef struct
SYSTEM_POWER_CAPABILITIES
PSYSTEM_POWER_CAPABILITIES
 
typedef struct
SYSTEM_BATTERY_STATE
PSYSTEM_BATTERY_STATE
 
typedef struct
_PROCESSOR_POWER_INFORMATION 
PROCESSOR_POWER_INFORMATION
 
typedef struct
_PROCESSOR_POWER_INFORMATION
PPROCESSOR_POWER_INFORMATION
 
typedef struct _POWER_ACTION_POLICY POWER_ACTION_POLICY
 
typedef struct
_POWER_ACTION_POLICY
PPOWER_ACTION_POLICY
 

Enumerations

enum  _SYSTEM_POWER_STATE {
  PowerSystemUnspecified, PowerSystemWorking, PowerSystemSleeping1, PowerSystemSleeping2,
  PowerSystemSleeping3, PowerSystemHibernate, PowerSystemShutdown, PowerSystemMaximum,
  PowerSystemUnspecified = 0, PowerSystemWorking, PowerSystemSleeping1, PowerSystemSleeping2,
  PowerSystemSleeping3, PowerSystemHibernate, PowerSystemShutdown, PowerSystemMaximum
}
 
enum  _DEVICE_POWER_STATE {
  PowerDeviceUnspecified, PowerDeviceD0, PowerDeviceD1, PowerDeviceD2,
  PowerDeviceD3, PowerDeviceMaximum, PowerDeviceUnspecified = 0, PowerDeviceD0,
  PowerDeviceD1, PowerDeviceD2, PowerDeviceD3, PowerDeviceMaximum,
  PowerDeviceUnspecified = 0, PowerDeviceD0, PowerDeviceD1, PowerDeviceD2,
  PowerDeviceD3, PowerDeviceMaximum
}
 
enum  _POWER_STATE_TYPE { SystemPowerState = 0, DevicePowerState, SystemPowerState = 0, DevicePowerState }
 
enum  _POWER_INFORMATION_LEVEL {
  SystemPowerPolicyAc, SystemPowerPolicyDc, VerifySystemPolicyAc, VerifySystemPolicyDc,
  SystemPowerCapabilities, SystemBatteryState, SystemPowerStateHandler, ProcessorStateHandler,
  SystemPowerPolicyCurrent, AdministratorPowerPolicy, SystemReserveHiberFile, ProcessorInformation,
  SystemPowerInformation, ProcessorStateHandler2, LastWakeTime, LastSleepTime,
  SystemExecutionState, SystemPowerStateNotifyHandler, ProcessorPowerPolicyAc, ProcessorPowerPolicyDc,
  VerifyProcessorPowerPolicyAc, VerifyProcessorPowerPolicyDc, ProcessorPowerPolicyCurrent, SystemPowerStateLogging,
  SystemPowerLoggingEntry, SetPowerSettingValue, NotifyUserPowerSetting, PowerInformationLevelUnused0,
  PowerInformationLevelUnused1, SystemVideoState, TraceApplicationPowerMessage, TraceApplicationPowerMessageEnd,
  ProcessorPerfStates, ProcessorIdleStates, ProcessorCap, SystemWakeSource,
  SystemHiberFileInformation, TraceServicePowerMessage, ProcessorLoad, PowerShutdownNotification,
  MonitorCapabilities, SessionPowerInit, SessionDisplayState, PowerRequestCreate,
  PowerRequestAction, GetPowerRequestList, ProcessorInformationEx, NotifyUserModeLegacyPowerEvent,
  GroupPark, ProcessorIdleDomains, WakeTimerList, SystemHiberFileSize,
  PowerInformationLevelMaximum, SystemPowerPolicyAc, SystemPowerPolicyDc, VerifySystemPolicyAc,
  VerifySystemPolicyDc, SystemPowerCapabilities, SystemBatteryState, SystemPowerStateHandler,
  ProcessorStateHandler, SystemPowerPolicyCurrent, AdministratorPowerPolicy, SystemReserveHiberFile,
  ProcessorInformation, SystemPowerInformation, ProcessorStateHandler2, LastWakeTime,
  LastSleepTime, SystemExecutionState, SystemPowerStateNotifyHandler, ProcessorPowerPolicyAc,
  ProcessorPowerPolicyDc, VerifyProcessorPowerPolicyAc, VerifyProcessorPowerPolicyDc, ProcessorPowerPolicyCurrent,
  SystemPowerStateLogging, SystemPowerLoggingEntry, SetPowerSettingValue, NotifyUserPowerSetting,
  PowerInformationLevelUnused0, PowerInformationLevelUnused1, SystemVideoState, TraceApplicationPowerMessage,
  TraceApplicationPowerMessageEnd, ProcessorPerfStates, ProcessorIdleStates, ProcessorCap,
  SystemWakeSource, SystemHiberFileInformation, TraceServicePowerMessage, ProcessorLoad,
  PowerShutdownNotification, MonitorCapabilities, SessionPowerInit, SessionDisplayState,
  PowerRequestCreate, PowerRequestAction, GetPowerRequestList, ProcessorInformationEx,
  NotifyUserModeLegacyPowerEvent, GroupPark, ProcessorIdleDomains, WakeTimerList,
  SystemHiberFileSize, PowerInformationLevelMaximum, SystemPowerPolicyAc, SystemPowerPolicyDc,
  VerifySystemPolicyAc, VerifySystemPolicyDc, SystemPowerCapabilities, SystemBatteryState,
  SystemPowerStateHandler, ProcessorStateHandler, SystemPowerPolicyCurrent, AdministratorPowerPolicy,
  SystemReserveHiberFile, ProcessorInformation, SystemPowerInformation, ProcessorStateHandler2,
  LastWakeTime, LastSleepTime, SystemExecutionState, SystemPowerStateNotifyHandler,
  ProcessorPowerPolicyAc, ProcessorPowerPolicyDc, VerifyProcessorPowerPolicyAc, VerifyProcessorPowerPolicyDc,
  ProcessorPowerPolicyCurrent, SystemPowerStateLogging, SystemPowerLoggingEntry, SetPowerSettingValue,
  NotifyUserPowerSetting, PowerInformationLevelUnused0, PowerInformationLevelUnused1, SystemVideoState,
  TraceApplicationPowerMessage, TraceApplicationPowerMessageEnd, ProcessorPerfStates, ProcessorIdleStates,
  ProcessorCap, SystemWakeSource, SystemHiberFileInformation, TraceServicePowerMessage,
  ProcessorLoad, PowerShutdownNotification, MonitorCapabilities, SessionPowerInit,
  SessionDisplayState, PowerRequestCreate, PowerRequestAction, GetPowerRequestList,
  ProcessorInformationEx, NotifyUserModeLegacyPowerEvent, GroupPark, ProcessorIdleDomains,
  WakeTimerList, SystemHiberFileSize, PowerInformationLevelMaximum
}
 
enum  POWER_ACTION {
  PowerActionNone, PowerActionReserved, PowerActionSleep, PowerActionHibernate,
  PowerActionShutdown, PowerActionShutdownReset, PowerActionShutdownOff, PowerActionWarmEject,
  PowerActionNone = 0, PowerActionReserved, PowerActionSleep, PowerActionHibernate,
  PowerActionShutdown, PowerActionShutdownReset, PowerActionShutdownOff, PowerActionWarmEject,
  PowerActionNone = 0, PowerActionReserved, PowerActionSleep, PowerActionHibernate,
  PowerActionShutdown, PowerActionShutdownReset, PowerActionShutdownOff, PowerActionWarmEject
}
 
enum  _POWER_STATE_HANDLER_TYPE {
  PowerStateSleeping1, PowerStateSleeping2, PowerStateSleeping3, PowerStateSleeping4,
  PowerStateSleeping4Firmware, PowerStateShutdownReset, PowerStateShutdownOff, PowerStateMaximum
}
 

Functions

 _Function_class_ (PROCESSOR_IDLE_HANDLER) typedef NTSTATUS(FASTCALL *PPROCESSOR_IDLE_HANDLER)(_In_ ULONG_PTR Context
 
 _Function_class_ (ENTER_STATE_SYSTEM_HANDLER) _IRQL_requires_same_ typedef NTSTATUS(NTAPI *PENTER_STATE_SYSTEM_HANDLER)(_In_ PVOID SystemContext)
 
 _Function_class_ (ENTER_STATE_HANDLER) _IRQL_requires_same_ typedef NTSTATUS(NTAPI *PENTER_STATE_HANDLER)(_In_opt_ PVOID Context
 
 _Function_class_ (ENTER_STATE_NOTIFY_HANDLER) _IRQL_requires_same_ typedef NTSTATUS(NTAPI *PENTER_STATE_NOTIFY_HANDLER)(_In_ POWER_STATE_HANDLER_TYPE State
 
 _IRQL_requires_max_ (APC_LEVEL) __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtPowerInformation(_In_ POWER_INFORMATION_LEVEL InformationLevel
 
 _In_reads_bytes_opt_ (InputBufferLength) PVOID InputBuffer
 
_In_ ULONG _Out_writes_bytes_opt_ (OutputBufferLength) PVOID OutputBuffer
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtSetThreadExecutionState(_In_ EXECUTION_STATE esFlags
 
NTSYSCALLAPI NTSTATUS NTAPI NtRequestWakeupLatency (_In_ LATENCY_TIME latency)
 
NTSYSCALLAPI NTSTATUS NTAPI NtCancelDeviceWakeupRequest (_In_ HANDLE Device)
 
NTSYSCALLAPI NTSTATUS NTAPI NtRequestDeviceWakeup (_In_ HANDLE Device)
 

Variables

_Inout_ PPROCESSOR_IDLE_TIMES IdleTimes
 
_In_opt_
PENTER_STATE_SYSTEM_HANDLER 
SystemHandler
 
_In_opt_
PENTER_STATE_SYSTEM_HANDLER
_In_opt_ PVOID 
SystemContext
 
_In_opt_
PENTER_STATE_SYSTEM_HANDLER
_In_opt_ PVOID _In_ LONG 
NumberProcessors
 
_In_opt_
PENTER_STATE_SYSTEM_HANDLER
_In_opt_ PVOID _In_ LONG
_In_opt_ LONG volatile
Number
 
_In_ PVOID Context
 
_In_ PVOID _In_ BOOLEAN Entering
 
_In_ ULONG InputBufferLength
 
_In_ ULONG _In_ ULONG OutputBufferLength
 
_Out_ EXECUTION_STATEPreviousFlags
 
_In_ SYSTEM_POWER_STATE MinSystemState
 
_In_ SYSTEM_POWER_STATE _In_ ULONG Flags
 
_In_ SYSTEM_POWER_STATE _In_
ULONG _In_ BOOLEAN 
Asynchronous
 
_Out_ DEVICE_POWER_STATEState
 

Macro Definition Documentation

#define _PO_DDK_

Definition at line 31 of file ntpoapi.h.

#define DISCHARGE_POLICY_CRITICAL   0

Definition at line 423 of file ntpoapi.h.

Referenced by Ala_InitData().

#define DISCHARGE_POLICY_LOW   1

Definition at line 424 of file ntpoapi.h.

Referenced by Ala_InitData().

#define MAX_IDLE_HANDLERS   3

Definition at line 172 of file ntpoapi.h.

#define NUM_DISCHARGE_POLICIES   4

Definition at line 425 of file ntpoapi.h.

Referenced by globalcompare().

#define PERCENT_TO_PERF_LEVEL (   x)    (((x) * POWER_PERF_SCALE * 10) / 1000)

Definition at line 145 of file ntpoapi.h.

#define PERF_LEVEL_TO_PERCENT (   x)    (((x) * 1000) / (POWER_PERF_SCALE * 10))

Definition at line 144 of file ntpoapi.h.

#define PO_THROTTLE_ADAPTIVE   3

Definition at line 430 of file ntpoapi.h.

#define PO_THROTTLE_CONSTANT   1

Definition at line 428 of file ntpoapi.h.

#define PO_THROTTLE_DEGRADE   2

Definition at line 429 of file ntpoapi.h.

#define PO_THROTTLE_MAXIMUM   4

Definition at line 431 of file ntpoapi.h.

#define PO_THROTTLE_NONE   0

Definition at line 427 of file ntpoapi.h.

#define POWER_ACTION_CRITICAL   0x80000000

Definition at line 413 of file ntpoapi.h.

Referenced by NtSetSystemPowerState(), and NtShutdownSystem().

#define POWER_ACTION_DISABLE_WAKES   0x40000000

Definition at line 412 of file ntpoapi.h.

Referenced by NtSetSystemPowerState(), and NtShutdownSystem().

#define POWER_ACTION_LIGHTEST_FIRST   0x10000000

Definition at line 410 of file ntpoapi.h.

Referenced by NtSetSystemPowerState().

#define POWER_ACTION_LOCK_CONSOLE   0x20000000

Definition at line 411 of file ntpoapi.h.

Referenced by NtSetSystemPowerState().

#define POWER_ACTION_OVERRIDE_APPS   0x00000004

Definition at line 409 of file ntpoapi.h.

Referenced by NtSetSystemPowerState(), and NtShutdownSystem().

#define POWER_ACTION_QUERY_ALLOWED   0x00000001
#define POWER_ACTION_UI_ALLOWED   0x00000002
#define POWER_FORCE_TRIGGER_RESET   0x80000000

Definition at line 421 of file ntpoapi.h.

Referenced by GetPowerActionFromPolicy(), and SaveCurrentPowerActionPolicy().

#define POWER_LEVEL_USER_NOTIFY_EXEC   0x00000004

Definition at line 418 of file ntpoapi.h.

#define POWER_LEVEL_USER_NOTIFY_SOUND   0x00000002

Definition at line 417 of file ntpoapi.h.

Referenced by Ala_InitData().

#define POWER_LEVEL_USER_NOTIFY_TEXT   0x00000001

Definition at line 416 of file ntpoapi.h.

Referenced by Ala_InitData().

#define POWER_PERF_SCALE   100

Definition at line 143 of file ntpoapi.h.

#define POWER_SYSTEM_MAXIMUM   PowerSystemMaximum

Definition at line 45 of file ntpoapi.h.

Referenced by IntVideoPortChildQueryCapabilities(), and USBH_StartHubFdoDevice().

#define POWER_USER_NOTIFY_BUTTON   0x00000008

Definition at line 419 of file ntpoapi.h.

Referenced by GetPowerActionFromPolicy(), and SaveCurrentPowerActionPolicy().

#define POWER_USER_NOTIFY_SHUTDOWN   0x00000010

Definition at line 420 of file ntpoapi.h.

Referenced by GetPowerActionFromPolicy(), and SaveCurrentPowerActionPolicy().

#define PROCESSOR_STATE_TYPE_PERFORMANCE   1

Definition at line 242 of file ntpoapi.h.

#define PROCESSOR_STATE_TYPE_THROTTLE   2

Definition at line 243 of file ntpoapi.h.

#define WINLOGON_LOCK_ON_SLEEP   0x00000001

Definition at line 338 of file ntpoapi.h.

Typedef Documentation

typedef union _POWER_STATE POWER_STATE
typedef union _POWER_STATE * PPOWER_STATE
typedef VOID(FASTCALL* PSET_PROCESSOR_THROTTLE)(IN UCHAR Throttle)

Definition at line 165 of file ntpoapi.h.

typedef NTSTATUS(FASTCALL* PSET_PROCESSOR_THROTTLE2)(IN UCHAR Throttle)

Definition at line 169 of file ntpoapi.h.

Enumeration Type Documentation

Enumerator
PowerDeviceUnspecified 
PowerDeviceD0 
PowerDeviceD1 
PowerDeviceD2 
PowerDeviceD3 
PowerDeviceMaximum 
PowerDeviceUnspecified 
PowerDeviceD0 
PowerDeviceD1 
PowerDeviceD2 
PowerDeviceD3 
PowerDeviceMaximum 
PowerDeviceUnspecified 
PowerDeviceD0 
PowerDeviceD1 
PowerDeviceD2 
PowerDeviceD3 
PowerDeviceMaximum 

Definition at line 47 of file ntpoapi.h.

47  {
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _DEVICE_POWER_STATE * PDEVICE_POWER_STATE
Enumerator
SystemPowerPolicyAc 
SystemPowerPolicyDc 
VerifySystemPolicyAc 
VerifySystemPolicyDc 
SystemPowerCapabilities 
SystemBatteryState 
SystemPowerStateHandler 
ProcessorStateHandler 
SystemPowerPolicyCurrent 
AdministratorPowerPolicy 
SystemReserveHiberFile 
ProcessorInformation 
SystemPowerInformation 
ProcessorStateHandler2 
LastWakeTime 
LastSleepTime 
SystemExecutionState 
SystemPowerStateNotifyHandler 
ProcessorPowerPolicyAc 
ProcessorPowerPolicyDc 
VerifyProcessorPowerPolicyAc 
VerifyProcessorPowerPolicyDc 
ProcessorPowerPolicyCurrent 
SystemPowerStateLogging 
SystemPowerLoggingEntry 
SetPowerSettingValue 
NotifyUserPowerSetting 
PowerInformationLevelUnused0 
PowerInformationLevelUnused1 
SystemVideoState 
TraceApplicationPowerMessage 
TraceApplicationPowerMessageEnd 
ProcessorPerfStates 
ProcessorIdleStates 
ProcessorCap 
SystemWakeSource 
SystemHiberFileInformation 
TraceServicePowerMessage 
ProcessorLoad 
PowerShutdownNotification 
MonitorCapabilities 
SessionPowerInit 
SessionDisplayState 
PowerRequestCreate 
PowerRequestAction 
GetPowerRequestList 
ProcessorInformationEx 
NotifyUserModeLegacyPowerEvent 
GroupPark 
ProcessorIdleDomains 
WakeTimerList 
SystemHiberFileSize 
PowerInformationLevelMaximum 
SystemPowerPolicyAc 
SystemPowerPolicyDc 
VerifySystemPolicyAc 
VerifySystemPolicyDc 
SystemPowerCapabilities 
SystemBatteryState 
SystemPowerStateHandler 
ProcessorStateHandler 
SystemPowerPolicyCurrent 
AdministratorPowerPolicy 
SystemReserveHiberFile 
ProcessorInformation 
SystemPowerInformation 
ProcessorStateHandler2 
LastWakeTime 
LastSleepTime 
SystemExecutionState 
SystemPowerStateNotifyHandler 
ProcessorPowerPolicyAc 
ProcessorPowerPolicyDc 
VerifyProcessorPowerPolicyAc 
VerifyProcessorPowerPolicyDc 
ProcessorPowerPolicyCurrent 
SystemPowerStateLogging 
SystemPowerLoggingEntry 
SetPowerSettingValue 
NotifyUserPowerSetting 
PowerInformationLevelUnused0 
PowerInformationLevelUnused1 
SystemVideoState 
TraceApplicationPowerMessage 
TraceApplicationPowerMessageEnd 
ProcessorPerfStates 
ProcessorIdleStates 
ProcessorCap 
SystemWakeSource 
SystemHiberFileInformation 
TraceServicePowerMessage 
ProcessorLoad 
PowerShutdownNotification 
MonitorCapabilities 
SessionPowerInit 
SessionDisplayState 
PowerRequestCreate 
PowerRequestAction 
GetPowerRequestList 
ProcessorInformationEx 
NotifyUserModeLegacyPowerEvent 
GroupPark 
ProcessorIdleDomains 
WakeTimerList 
SystemHiberFileSize 
PowerInformationLevelMaximum 
SystemPowerPolicyAc 
SystemPowerPolicyDc 
VerifySystemPolicyAc 
VerifySystemPolicyDc 
SystemPowerCapabilities 
SystemBatteryState 
SystemPowerStateHandler 
ProcessorStateHandler 
SystemPowerPolicyCurrent 
AdministratorPowerPolicy 
SystemReserveHiberFile 
ProcessorInformation 
SystemPowerInformation 
ProcessorStateHandler2 
LastWakeTime 
LastSleepTime 
SystemExecutionState 
SystemPowerStateNotifyHandler 
ProcessorPowerPolicyAc 
ProcessorPowerPolicyDc 
VerifyProcessorPowerPolicyAc 
VerifyProcessorPowerPolicyDc 
ProcessorPowerPolicyCurrent 
SystemPowerStateLogging 
SystemPowerLoggingEntry 
SetPowerSettingValue 
NotifyUserPowerSetting 
PowerInformationLevelUnused0 
PowerInformationLevelUnused1 
SystemVideoState 
TraceApplicationPowerMessage 
TraceApplicationPowerMessageEnd 
ProcessorPerfStates 
ProcessorIdleStates 
ProcessorCap 
SystemWakeSource 
SystemHiberFileInformation 
TraceServicePowerMessage 
ProcessorLoad 
PowerShutdownNotification 
MonitorCapabilities 
SessionPowerInit 
SessionDisplayState 
PowerRequestCreate 
PowerRequestAction 
GetPowerRequestList 
ProcessorInformationEx 
NotifyUserModeLegacyPowerEvent 
GroupPark 
ProcessorIdleDomains 
WakeTimerList 
SystemHiberFileSize 
PowerInformationLevelMaximum 

Definition at line 66 of file ntpoapi.h.

66  {
101  ProcessorCap,
115  GroupPark,
enum _POWER_INFORMATION_LEVEL POWER_INFORMATION_LEVEL
Enumerator
PowerStateSleeping1 
PowerStateSleeping2 
PowerStateSleeping3 
PowerStateSleeping4 
PowerStateSleeping4Firmware 
PowerStateShutdownReset 
PowerStateShutdownOff 
PowerStateMaximum 

Definition at line 182 of file ntpoapi.h.

Enumerator
SystemPowerState 
DevicePowerState 
SystemPowerState 
DevicePowerState 

Definition at line 61 of file ntpoapi.h.

61  {
62  SystemPowerState = 0,
enum _POWER_STATE_TYPE POWER_STATE_TYPE
enum _POWER_STATE_TYPE * PPOWER_STATE_TYPE
Enumerator
PowerSystemUnspecified 
PowerSystemWorking 
PowerSystemSleeping1 
PowerSystemSleeping2 
PowerSystemSleeping3 
PowerSystemHibernate 
PowerSystemShutdown 
PowerSystemMaximum 
PowerSystemUnspecified 
PowerSystemWorking 
PowerSystemSleeping1 
PowerSystemSleeping2 
PowerSystemSleeping3 
PowerSystemHibernate 
PowerSystemShutdown 
PowerSystemMaximum 

Definition at line 34 of file ntpoapi.h.

Enumerator
PowerActionNone 
PowerActionReserved 
PowerActionSleep 
PowerActionHibernate 
PowerActionShutdown 
PowerActionShutdownReset 
PowerActionShutdownOff 
PowerActionWarmEject 
PowerActionNone 
PowerActionReserved 
PowerActionSleep 
PowerActionHibernate 
PowerActionShutdown 
PowerActionShutdownReset 
PowerActionShutdownOff 
PowerActionWarmEject 
PowerActionNone 
PowerActionReserved 
PowerActionSleep 
PowerActionHibernate 
PowerActionShutdown 
PowerActionShutdownReset 
PowerActionShutdownOff 
PowerActionWarmEject 

Definition at line 122 of file ntpoapi.h.

Function Documentation

_Function_class_ ( PROCESSOR_IDLE_HANDLER  )
_Function_class_ ( ENTER_STATE_SYSTEM_HANDLER  )
_Function_class_ ( ENTER_STATE_HANDLER  )
_Function_class_ ( ENTER_STATE_NOTIFY_HANDLER  )
_In_reads_bytes_opt_ ( InputBufferLength  )
_IRQL_requires_max_ ( APC_LEVEL  )
_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Definition at line 37 of file Messaging.c.

48 {
49  PFLT_SERVER_PORT_OBJECT PortObject;
51 
52  /* The caller must allow at least one connection */
53  if (MaxConnections == 0)
54  {
56  }
57 
58  /* The request must be for a kernel handle */
59  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
60  {
62  }
63 
64  /*
65  * Get rundown protection on the target to stop the owner
66  * from unloading whilst this port object is open. It gets
67  * removed in the FltpServerPortClose callback
68  */
69  Status = FltObjectReference(Filter);
70  if (!NT_SUCCESS(Status))
71  {
72  return Status;
73  }
74 
75  /* Create our new server port object */
76  Status = ObCreateObject(0,
79  KernelMode,
80  NULL,
81  sizeof(FLT_SERVER_PORT_OBJECT),
82  0,
83  0,
84  (PVOID *)&PortObject);
85  if (NT_SUCCESS(Status))
86  {
87  /* Zero out the struct */
88  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
89 
90  /* Increment the ref count on the target filter */
92 
93  /* Setup the filter port object */
94  PortObject->Filter = Filter;
98  PortObject->Cookie = ServerPortCookie;
99  PortObject->MaxConnections = MaxConnections;
100 
101  /* Insert the object */
102  Status = ObInsertObject(PortObject,
103  NULL,
105  0,
106  NULL,
108  if (NT_SUCCESS(Status))
109  {
110  /* Lock the connection list */
112 
113  /* Add the new port object to the connection list and increment the count */
116 
117  /* Unlock the connection list*/
119  }
120  }
121 
122  if (!NT_SUCCESS(Status))
123  {
124  /* Allow the filter to be cleaned up */
126  }
127 
128  return STATUS_NOT_IMPLEMENTED;
129 }
DWORD *typedef PVOID
Definition: winlogon.h:52
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:177
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
#define InsertTailList(ListHead, Entry)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:252
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
smooth NULL
Definition: ftsmooth.c:513
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:938
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:23
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: cmd.c:149
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2925
LONG NTSTATUS
Definition: DriverTester.h:11
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:179
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:178
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:86
NTSYSCALLAPI NTSTATUS NTAPI NtCancelDeviceWakeupRequest ( _In_ HANDLE  Device)
NTSYSCALLAPI NTSTATUS NTAPI NtRequestDeviceWakeup ( _In_ HANDLE  Device)
NTSYSCALLAPI NTSTATUS NTAPI NtRequestWakeupLatency ( _In_ LATENCY_TIME  latency)

Variable Documentation

Definition at line 222 of file ntpoapi.h.

_In_ PVOID _In_ BOOLEAN Entering

Definition at line 222 of file ntpoapi.h.

Definition at line 296 of file ntpoapi.h.

Definition at line 157 of file ntpoapi.h.

_In_ ULONG InputBufferLength

Definition at line 238 of file ntpoapi.h.

_In_ SYSTEM_POWER_STATE MinSystemState

Definition at line 296 of file ntpoapi.h.

_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG NumberProcessors

Definition at line 204 of file ntpoapi.h.

_In_ ULONG _In_ ULONG OutputBufferLength

Definition at line 240 of file ntpoapi.h.

_Out_ EXECUTION_STATE* PreviousFlags

Definition at line 281 of file ntpoapi.h.

Definition at line 317 of file ntpoapi.h.

_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID SystemContext

Definition at line 204 of file ntpoapi.h.

_In_opt_ PENTER_STATE_SYSTEM_HANDLER SystemHandler

Definition at line 204 of file ntpoapi.h.