ReactOS 0.4.16-dev-122-g325d74c
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_INFORMATION
 
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_SCALEPBATTERY_REPORTING_SCALE
 
typedef struct _PROCESSOR_IDLE_TIMES PROCESSOR_IDLE_TIMES
 
typedef struct _PROCESSOR_IDLE_TIMESPPROCESSOR_IDLE_TIMES
 
typedef struct _PROCESSOR_IDLE_HANDLER_INFO PROCESSOR_IDLE_HANDLER_INFO
 
typedef struct _PROCESSOR_IDLE_HANDLER_INFOPPROCESSOR_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_HANDLERPPROCESSOR_STATE_HANDLER
 
typedef enum _POWER_STATE_HANDLER_TYPE POWER_STATE_HANDLER_TYPE
 
typedef enum _POWER_STATE_HANDLER_TYPEPPOWER_STATE_HANDLER_TYPE
 
typedef struct _POWER_STATE_HANDLER POWER_STATE_HANDLER
 
typedef struct _POWER_STATE_HANDLERPPOWER_STATE_HANDLER
 
typedef struct _POWER_STATE_NOTIFY_HANDLER POWER_STATE_NOTIFY_HANDLER
 
typedef struct _POWER_STATE_NOTIFY_HANDLERPPOWER_STATE_NOTIFY_HANDLER
 
typedef struct _PROCESSOR_PERF_LEVEL PROCESSOR_PERF_LEVEL
 
typedef struct _PROCESSOR_PERF_LEVELPPROCESSOR_PERF_LEVEL
 
typedef struct _PROCESSOR_PERF_STATE PROCESSOR_PERF_STATE
 
typedef struct _PROCESSOR_PERF_STATEPPROCESSOR_PERF_STATE
 
typedef struct _PROCESSOR_STATE_HANDLER2 PROCESSOR_STATE_HANDLER2
 
typedef struct _PROCESSOR_STATE_HANDLER2PPROCESSOR_STATE_HANDLER2
 
typedef struct _SYSTEM_POWER_INFORMATION SYSTEM_POWER_INFORMATION
 
typedef struct _SYSTEM_POWER_INFORMATIONPSYSTEM_POWER_INFORMATION
 
typedef struct SYSTEM_POWER_CAPABILITIESPSYSTEM_POWER_CAPABILITIES
 
typedef struct SYSTEM_BATTERY_STATEPSYSTEM_BATTERY_STATE
 
typedef struct _PROCESSOR_POWER_INFORMATION PROCESSOR_POWER_INFORMATION
 
typedef struct _PROCESSOR_POWER_INFORMATIONPPROCESSOR_POWER_INFORMATION
 
typedef struct _POWER_ACTION_POLICY POWER_ACTION_POLICY
 
typedef struct _POWER_ACTION_POLICYPPOWER_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 , SystemMonitorHiberBootPowerOff , SystemVideoState , TraceApplicationPowerMessage ,
  TraceApplicationPowerMessageEnd , ProcessorPerfStates , ProcessorIdleStates , ProcessorCap ,
  SystemWakeSource , SystemHiberFileInformation , TraceServicePowerMessage , ProcessorLoad ,
  PowerShutdownNotification , MonitorCapabilities , SessionPowerInit , SessionDisplayState ,
  PowerRequestCreate , PowerRequestAction , GetPowerRequestList , ProcessorInformationEx ,
  NotifyUserModeLegacyPowerEvent , GroupPark , ProcessorIdleDomains , WakeTimerList ,
  SystemHiberFileSize , ProcessorIdleStatesHv , ProcessorPerfStatesHv , ProcessorPerfCapHv ,
  ProcessorSetIdle , LogicalProcessorIdling , UserPresence , PowerSettingNotificationName ,
  GetPowerSettingValue , IdleResiliency , SessionRITState , SessionConnectNotification ,
  SessionPowerCleanup , SessionLockState , SystemHiberbootState , PlatformInformation ,
  PdcInvocation , MonitorInvocation , FirmwareTableInformationRegistered , SetShutdownSelectedTime ,
  SuspendResumeInvocation , PlmPowerRequestCreate , ScreenOff , CsDeviceNotification ,
  PlatformRole , LastResumePerformance , DisplayBurst , ExitLatencySamplingPercentage ,
  RegisterSpmPowerSettings , PlatformIdleStates , ProcessorIdleVeto , PlatformIdleVeto ,
  SystemBatteryStatePrecise , ThermalEvent , PowerRequestActionInternal , BatteryDeviceState ,
  PowerInformationInternal , ThermalStandby , SystemHiberFileType , PhysicalPowerButtonPress ,
  QueryPotentialDripsConstraint , EnergyTrackerCreate , EnergyTrackerQuery , UpdateBlackBoxRecorder ,
  SessionAllowExternalDmaDevices , 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
 Probes and locks virtual pages in memory for the specified process.
 
 _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
 Queries information details about a security descriptor.
 
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 volatileNumber
 
_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

◆ _PO_DDK_

#define _PO_DDK_

Definition at line 31 of file ntpoapi.h.

◆ DISCHARGE_POLICY_CRITICAL

#define DISCHARGE_POLICY_CRITICAL   0

Definition at line 430 of file ntpoapi.h.

◆ DISCHARGE_POLICY_LOW

#define DISCHARGE_POLICY_LOW   1

Definition at line 431 of file ntpoapi.h.

◆ MAX_IDLE_HANDLERS

#define MAX_IDLE_HANDLERS   3

Definition at line 172 of file ntpoapi.h.

◆ NUM_DISCHARGE_POLICIES

#define NUM_DISCHARGE_POLICIES   4

Definition at line 432 of file ntpoapi.h.

◆ PERCENT_TO_PERF_LEVEL

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

Definition at line 145 of file ntpoapi.h.

◆ PERF_LEVEL_TO_PERCENT

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

Definition at line 144 of file ntpoapi.h.

◆ PO_THROTTLE_ADAPTIVE

#define PO_THROTTLE_ADAPTIVE   3

Definition at line 437 of file ntpoapi.h.

◆ PO_THROTTLE_CONSTANT

#define PO_THROTTLE_CONSTANT   1

Definition at line 435 of file ntpoapi.h.

◆ PO_THROTTLE_DEGRADE

#define PO_THROTTLE_DEGRADE   2

Definition at line 436 of file ntpoapi.h.

◆ PO_THROTTLE_MAXIMUM

#define PO_THROTTLE_MAXIMUM   4

Definition at line 438 of file ntpoapi.h.

◆ PO_THROTTLE_NONE

#define PO_THROTTLE_NONE   0

Definition at line 434 of file ntpoapi.h.

◆ POWER_ACTION_CRITICAL

#define POWER_ACTION_CRITICAL   0x80000000

Definition at line 420 of file ntpoapi.h.

◆ POWER_ACTION_DISABLE_WAKES

#define POWER_ACTION_DISABLE_WAKES   0x40000000

Definition at line 419 of file ntpoapi.h.

◆ POWER_ACTION_LIGHTEST_FIRST

#define POWER_ACTION_LIGHTEST_FIRST   0x10000000

Definition at line 417 of file ntpoapi.h.

◆ POWER_ACTION_LOCK_CONSOLE

#define POWER_ACTION_LOCK_CONSOLE   0x20000000

Definition at line 418 of file ntpoapi.h.

◆ POWER_ACTION_OVERRIDE_APPS

#define POWER_ACTION_OVERRIDE_APPS   0x00000004

Definition at line 416 of file ntpoapi.h.

◆ POWER_ACTION_QUERY_ALLOWED

#define POWER_ACTION_QUERY_ALLOWED   0x00000001

Definition at line 414 of file ntpoapi.h.

◆ POWER_ACTION_UI_ALLOWED

#define POWER_ACTION_UI_ALLOWED   0x00000002

Definition at line 415 of file ntpoapi.h.

◆ POWER_FORCE_TRIGGER_RESET

#define POWER_FORCE_TRIGGER_RESET   0x80000000

Definition at line 428 of file ntpoapi.h.

◆ POWER_LEVEL_USER_NOTIFY_EXEC

#define POWER_LEVEL_USER_NOTIFY_EXEC   0x00000004

Definition at line 425 of file ntpoapi.h.

◆ POWER_LEVEL_USER_NOTIFY_SOUND

#define POWER_LEVEL_USER_NOTIFY_SOUND   0x00000002

Definition at line 424 of file ntpoapi.h.

◆ POWER_LEVEL_USER_NOTIFY_TEXT

#define POWER_LEVEL_USER_NOTIFY_TEXT   0x00000001

Definition at line 423 of file ntpoapi.h.

◆ POWER_PERF_SCALE

#define POWER_PERF_SCALE   100

Definition at line 143 of file ntpoapi.h.

◆ POWER_SYSTEM_MAXIMUM

#define POWER_SYSTEM_MAXIMUM   PowerSystemMaximum

Definition at line 45 of file ntpoapi.h.

◆ POWER_USER_NOTIFY_BUTTON

#define POWER_USER_NOTIFY_BUTTON   0x00000008

Definition at line 426 of file ntpoapi.h.

◆ POWER_USER_NOTIFY_SHUTDOWN

#define POWER_USER_NOTIFY_SHUTDOWN   0x00000010

Definition at line 427 of file ntpoapi.h.

◆ PROCESSOR_STATE_TYPE_PERFORMANCE

#define PROCESSOR_STATE_TYPE_PERFORMANCE   1

Definition at line 242 of file ntpoapi.h.

◆ PROCESSOR_STATE_TYPE_THROTTLE

#define PROCESSOR_STATE_TYPE_THROTTLE   2

Definition at line 243 of file ntpoapi.h.

◆ WINLOGON_LOCK_ON_SLEEP

#define WINLOGON_LOCK_ON_SLEEP   0x00000001

Definition at line 345 of file ntpoapi.h.

Typedef Documentation

◆ DEVICE_POWER_STATE

◆ PBATTERY_REPORTING_SCALE

◆ PDEVICE_POWER_STATE

◆ POWER_ACTION_POLICY

◆ POWER_INFORMATION_LEVEL

◆ POWER_STATE

typedef union _POWER_STATE POWER_STATE

◆ POWER_STATE_HANDLER

◆ POWER_STATE_HANDLER_TYPE

◆ POWER_STATE_NOTIFY_HANDLER

◆ POWER_STATE_TYPE

◆ PPOWER_ACTION

◆ PPOWER_ACTION_POLICY

◆ PPOWER_STATE

typedef union _POWER_STATE * PPOWER_STATE

◆ PPOWER_STATE_HANDLER

◆ PPOWER_STATE_HANDLER_TYPE

◆ PPOWER_STATE_NOTIFY_HANDLER

◆ PPOWER_STATE_TYPE

◆ PPROCESSOR_IDLE_HANDLER_INFO

◆ PPROCESSOR_IDLE_TIMES

◆ PPROCESSOR_PERF_LEVEL

◆ PPROCESSOR_PERF_STATE

◆ PPROCESSOR_POWER_INFORMATION

◆ PPROCESSOR_STATE_HANDLER

◆ PPROCESSOR_STATE_HANDLER2

◆ PROCESSOR_IDLE_HANDLER_INFO

◆ PROCESSOR_IDLE_TIMES

◆ PROCESSOR_PERF_LEVEL

◆ PROCESSOR_PERF_STATE

◆ PROCESSOR_POWER_INFORMATION

◆ PROCESSOR_STATE_HANDLER

◆ PROCESSOR_STATE_HANDLER2

◆ PSET_PROCESSOR_THROTTLE

typedef VOID(FASTCALL * PSET_PROCESSOR_THROTTLE) (IN UCHAR Throttle)

Definition at line 164 of file ntpoapi.h.

◆ PSET_PROCESSOR_THROTTLE2

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

Definition at line 168 of file ntpoapi.h.

◆ PSYSTEM_BATTERY_STATE

◆ PSYSTEM_POWER_CAPABILITIES

◆ PSYSTEM_POWER_INFORMATION

◆ PSYSTEM_POWER_STATE

◆ SYSTEM_POWER_INFORMATION

◆ SYSTEM_POWER_STATE

Enumeration Type Documentation

◆ _DEVICE_POWER_STATE

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 * PDEVICE_POWER_STATE
@ PowerDeviceD1
Definition: ntpoapi.h:50
@ PowerDeviceUnspecified
Definition: ntpoapi.h:48
@ PowerDeviceD0
Definition: ntpoapi.h:49
@ PowerDeviceD2
Definition: ntpoapi.h:51
@ PowerDeviceD3
Definition: ntpoapi.h:52
@ PowerDeviceMaximum
Definition: ntpoapi.h:53
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE

◆ _POWER_INFORMATION_LEVEL

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 
SystemMonitorHiberBootPowerOff 
SystemVideoState 
TraceApplicationPowerMessage 
TraceApplicationPowerMessageEnd 
ProcessorPerfStates 
ProcessorIdleStates 
ProcessorCap 
SystemWakeSource 
SystemHiberFileInformation 
TraceServicePowerMessage 
ProcessorLoad 
PowerShutdownNotification 
MonitorCapabilities 
SessionPowerInit 
SessionDisplayState 
PowerRequestCreate 
PowerRequestAction 
GetPowerRequestList 
ProcessorInformationEx 
NotifyUserModeLegacyPowerEvent 
GroupPark 
ProcessorIdleDomains 
WakeTimerList 
SystemHiberFileSize 
ProcessorIdleStatesHv 
ProcessorPerfStatesHv 
ProcessorPerfCapHv 
ProcessorSetIdle 
LogicalProcessorIdling 
UserPresence 
PowerSettingNotificationName 
GetPowerSettingValue 
IdleResiliency 
SessionRITState 
SessionConnectNotification 
SessionPowerCleanup 
SessionLockState 
SystemHiberbootState 
PlatformInformation 
PdcInvocation 
MonitorInvocation 
FirmwareTableInformationRegistered 
SetShutdownSelectedTime 
SuspendResumeInvocation 
PlmPowerRequestCreate 
ScreenOff 
CsDeviceNotification 
PlatformRole 
LastResumePerformance 
DisplayBurst 
ExitLatencySamplingPercentage 
RegisterSpmPowerSettings 
PlatformIdleStates 
ProcessorIdleVeto 
PlatformIdleVeto 
SystemBatteryStatePrecise 
ThermalEvent 
PowerRequestActionInternal 
BatteryDeviceState 
PowerInformationInternal 
ThermalStandby 
SystemHiberFileType 
PhysicalPowerButtonPress 
QueryPotentialDripsConstraint 
EnergyTrackerCreate 
EnergyTrackerQuery 
UpdateBlackBoxRecorder 
SessionAllowExternalDmaDevices 
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 {
115 GroupPark,
enum _POWER_INFORMATION_LEVEL POWER_INFORMATION_LEVEL
@ ProcessorCap
Definition: ntpoapi.h:101
@ TraceServicePowerMessage
Definition: ntpoapi.h:104
@ SystemWakeSource
Definition: ntpoapi.h:102
@ SessionDisplayState
Definition: ntpoapi.h:109
@ SessionPowerInit
Definition: ntpoapi.h:108
@ ProcessorPowerPolicyDc
Definition: ntpoapi.h:86
@ GroupPark
Definition: ntpoapi.h:115
@ TraceApplicationPowerMessage
Definition: ntpoapi.h:97
@ ProcessorInformationEx
Definition: ntpoapi.h:113
@ SystemPowerStateNotifyHandler
Definition: ntpoapi.h:84
@ SystemPowerStateLogging
Definition: ntpoapi.h:90
@ ProcessorIdleStates
Definition: ntpoapi.h:100
@ LastWakeTime
Definition: ntpoapi.h:81
@ SystemHiberFileInformation
Definition: ntpoapi.h:103
@ SystemBatteryState
Definition: ntpoapi.h:72
@ AdministratorPowerPolicy
Definition: ntpoapi.h:76
@ LastSleepTime
Definition: ntpoapi.h:82
@ ProcessorIdleDomains
Definition: ntpoapi.h:116
@ PowerShutdownNotification
Definition: ntpoapi.h:106
@ SystemReserveHiberFile
Definition: ntpoapi.h:77
@ SystemPowerInformation
Definition: ntpoapi.h:79
@ SystemPowerCapabilities
Definition: ntpoapi.h:71
@ SystemPowerLoggingEntry
Definition: ntpoapi.h:91
@ ProcessorPerfStates
Definition: ntpoapi.h:99
@ PowerRequestAction
Definition: ntpoapi.h:111
@ SystemVideoState
Definition: ntpoapi.h:96
@ ProcessorStateHandler
Definition: ntpoapi.h:74
@ ProcessorPowerPolicyCurrent
Definition: ntpoapi.h:89
@ NotifyUserModeLegacyPowerEvent
Definition: ntpoapi.h:114
@ PowerRequestCreate
Definition: ntpoapi.h:110
@ WakeTimerList
Definition: ntpoapi.h:117
@ NotifyUserPowerSetting
Definition: ntpoapi.h:93
@ SystemExecutionState
Definition: ntpoapi.h:83
@ VerifyProcessorPowerPolicyDc
Definition: ntpoapi.h:88
@ SetPowerSettingValue
Definition: ntpoapi.h:92
@ VerifySystemPolicyDc
Definition: ntpoapi.h:70
@ SystemHiberFileSize
Definition: ntpoapi.h:118
@ ProcessorStateHandler2
Definition: ntpoapi.h:80
@ SystemPowerPolicyAc
Definition: ntpoapi.h:67
@ MonitorCapabilities
Definition: ntpoapi.h:107
@ PowerInformationLevelUnused1
Definition: ntpoapi.h:95
@ ProcessorInformation
Definition: ntpoapi.h:78
@ VerifyProcessorPowerPolicyAc
Definition: ntpoapi.h:87
@ VerifySystemPolicyAc
Definition: ntpoapi.h:69
@ PowerInformationLevelUnused0
Definition: ntpoapi.h:94
@ PowerInformationLevelMaximum
Definition: ntpoapi.h:119
@ ProcessorPowerPolicyAc
Definition: ntpoapi.h:85
@ SystemPowerPolicyDc
Definition: ntpoapi.h:68
@ SystemPowerPolicyCurrent
Definition: ntpoapi.h:75
@ TraceApplicationPowerMessageEnd
Definition: ntpoapi.h:98
@ SystemPowerStateHandler
Definition: ntpoapi.h:73
@ ProcessorLoad
Definition: ntpoapi.h:105
@ GetPowerRequestList
Definition: ntpoapi.h:112

◆ _POWER_STATE_HANDLER_TYPE

Enumerator
PowerStateSleeping1 
PowerStateSleeping2 
PowerStateSleeping3 
PowerStateSleeping4 
PowerStateSleeping4Firmware 
PowerStateShutdownReset 
PowerStateShutdownOff 
PowerStateMaximum 

Definition at line 182 of file ntpoapi.h.

182 {
enum _POWER_STATE_HANDLER_TYPE POWER_STATE_HANDLER_TYPE
enum _POWER_STATE_HANDLER_TYPE * PPOWER_STATE_HANDLER_TYPE
@ PowerStateMaximum
Definition: ntpoapi.h:190
@ PowerStateSleeping4
Definition: ntpoapi.h:186
@ PowerStateSleeping2
Definition: ntpoapi.h:184
@ PowerStateShutdownReset
Definition: ntpoapi.h:188
@ PowerStateSleeping1
Definition: ntpoapi.h:183
@ PowerStateSleeping4Firmware
Definition: ntpoapi.h:187
@ PowerStateSleeping3
Definition: ntpoapi.h:185
@ PowerStateShutdownOff
Definition: ntpoapi.h:189

◆ _POWER_STATE_TYPE

Enumerator
SystemPowerState 
DevicePowerState 
SystemPowerState 
DevicePowerState 

Definition at line 61 of file ntpoapi.h.

61 {
enum _POWER_STATE_TYPE POWER_STATE_TYPE
@ DevicePowerState
Definition: ntpoapi.h:63
enum _POWER_STATE_TYPE * PPOWER_STATE_TYPE
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7519

◆ _SYSTEM_POWER_STATE

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.

34 {
enum _SYSTEM_POWER_STATE * PSYSTEM_POWER_STATE
@ PowerSystemMaximum
Definition: ntpoapi.h:42
@ PowerSystemUnspecified
Definition: ntpoapi.h:35
@ PowerSystemSleeping1
Definition: ntpoapi.h:37
@ PowerSystemSleeping2
Definition: ntpoapi.h:38
@ PowerSystemSleeping3
Definition: ntpoapi.h:39
@ PowerSystemShutdown
Definition: ntpoapi.h:41
@ PowerSystemWorking
Definition: ntpoapi.h:36
@ PowerSystemHibernate
Definition: ntpoapi.h:40
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE

◆ POWER_ACTION

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.

122 {
enum POWER_ACTION * PPOWER_ACTION
POWER_ACTION
Definition: ntpoapi.h:122
@ PowerActionShutdownOff
Definition: ntpoapi.h:129
@ PowerActionNone
Definition: ntpoapi.h:123
@ PowerActionHibernate
Definition: ntpoapi.h:126
@ PowerActionShutdown
Definition: ntpoapi.h:127
@ PowerActionShutdownReset
Definition: ntpoapi.h:128
@ PowerActionWarmEject
Definition: ntpoapi.h:130
@ PowerActionReserved
Definition: ntpoapi.h:124
@ PowerActionSleep
Definition: ntpoapi.h:125

Function Documentation

◆ _Function_class_() [1/4]

_Function_class_ ( ENTER_STATE_HANDLER  )

◆ _Function_class_() [2/4]

_Function_class_ ( ENTER_STATE_NOTIFY_HANDLER  )

◆ _Function_class_() [3/4]

_Function_class_ ( ENTER_STATE_SYSTEM_HANDLER  )

◆ _Function_class_() [4/4]

_Function_class_ ( PROCESSOR_IDLE_HANDLER  )

◆ _In_reads_bytes_opt_()

_In_reads_bytes_opt_ ( InputBufferLength  )

◆ _IRQL_requires_max_() [1/2]

_IRQL_requires_max_ ( APC_LEVEL  )

Probes and locks virtual pages in memory for the specified process.

Parameters
[in,out]MemoryDescriptorListMemory Descriptor List (MDL) containing the buffer to be probed and locked.
[in]ProcessThe process for which the buffer should be probed and locked.
[in]AccessModeAccess mode for probing the pages. Can be KernelMode or UserMode.
[in]LockOperationThe type of the probing and locking operation. Can be IoReadAccess, IoWriteAccess or IoModifyAccess.
Returns
Nothing.
See also
MmProbeAndLockPages
Remarks
Must be called at IRQL <= APC_LEVEL

Definition at line 37 of file cddata.c.

254{
255 THREAD_CONTEXT ThreadContext = {0};
256 PIRP_CONTEXT IrpContext = NULL;
258
259#ifdef CD_SANITY
260 PVOID PreviousTopLevel;
261#endif
262
264
265#if DBG
266
267 KIRQL SaveIrql = KeGetCurrentIrql();
268
269#endif
270
272
274
276
277#ifdef CD_SANITY
278 PreviousTopLevel = IoGetTopLevelIrp();
279#endif
280
281 //
282 // Loop until this request has been completed or posted.
283 //
284
285 do {
286
287 //
288 // Use a try-except to handle the exception cases.
289 //
290
291 _SEH2_TRY {
292
293 //
294 // If the IrpContext is NULL then this is the first pass through
295 // this loop.
296 //
297
298 if (IrpContext == NULL) {
299
300 //
301 // Decide if this request is waitable an allocate the IrpContext.
302 // If the file object in the stack location is NULL then this
303 // is a mount which is always waitable. Otherwise we look at
304 // the file object flags.
305 //
306
308
309 Wait = TRUE;
310
311 } else {
312
313 Wait = CanFsdWait( Irp );
314 }
315
316 IrpContext = CdCreateIrpContext( Irp, Wait );
317
318 //
319 // Update the thread context information.
320 //
321
322 CdSetThreadContext( IrpContext, &ThreadContext );
323
324#ifdef CD_SANITY
325 NT_ASSERT( !CdTestTopLevel ||
326 SafeNodeType( IrpContext->TopLevel ) == CDFS_NTC_IRP_CONTEXT );
327#endif
328
329 //
330 // Otherwise cleanup the IrpContext for the retry.
331 //
332
333 } else {
334
335 //
336 // Set the MORE_PROCESSING flag to make sure the IrpContext
337 // isn't inadvertently deleted here. Then cleanup the
338 // IrpContext to perform the retry.
339 //
340
341 SetFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_MORE_PROCESSING );
342 CdCleanupIrpContext( IrpContext, FALSE );
343 }
344
345 //
346 // Case on the major irp code.
347 //
348
349 switch (IrpContext->MajorFunction) {
350
351 case IRP_MJ_CREATE :
352
353 Status = CdCommonCreate( IrpContext, Irp );
354 break;
355
356 case IRP_MJ_CLOSE :
357
358 Status = CdCommonClose( IrpContext, Irp );
359 break;
360
361 case IRP_MJ_READ :
362
363 //
364 // If this is an Mdl complete request, don't go through
365 // common read.
366 //
367
368 if (FlagOn( IrpContext->MinorFunction, IRP_MN_COMPLETE )) {
369
370 Status = CdCompleteMdl( IrpContext, Irp );
371
372 } else {
373
374 Status = CdCommonRead( IrpContext, Irp );
375 }
376
377 break;
378
379 case IRP_MJ_WRITE :
380
381 Status = CdCommonWrite( IrpContext, Irp );
382 break;
383
385
386 Status = CdCommonQueryInfo( IrpContext, Irp );
387 break;
388
390
391 Status = CdCommonSetInfo( IrpContext, Irp );
392 break;
393
395
396 Status = CdCommonQueryVolInfo( IrpContext, Irp );
397 break;
398
400
401 Status = CdCommonDirControl( IrpContext, Irp );
402 break;
403
405
406 Status = CdCommonFsControl( IrpContext, Irp );
407 break;
408
410
411 Status = CdCommonDevControl( IrpContext, Irp );
412 break;
413
415
416 Status = CdCommonLockControl( IrpContext, Irp );
417 break;
418
419 case IRP_MJ_CLEANUP :
420
421 Status = CdCommonCleanup( IrpContext, Irp );
422 break;
423
424 case IRP_MJ_PNP :
425
426 Status = CdCommonPnp( IrpContext, Irp );
427 break;
428
429 case IRP_MJ_SHUTDOWN :
430
431 Status = CdCommonShutdown( IrpContext, Irp );
432 break;
433
434 default :
435
437 CdCompleteRequest( IrpContext, Irp, Status );
438 }
439
441
442 Status = CdProcessException( IrpContext, Irp, _SEH2_GetExceptionCode() );
443 } _SEH2_END;
444
445 } while (Status == STATUS_CANT_WAIT);
446
447#ifdef CD_SANITY
448 NT_ASSERT( !CdTestTopLevel ||
449 (PreviousTopLevel == IoGetTopLevelIrp()) );
450#endif
451
453
454 NT_ASSERT( SaveIrql == KeGetCurrentIrql( ));
455
456 return Status;
457}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
Definition: cddata.c:914
LONG CdExceptionFilter(_Inout_ PIRP_CONTEXT IrpContext, _In_ PEXCEPTION_POINTERS ExceptionPointer)
Definition: cddata.c:525
VOID CdSetThreadContext(_Inout_ PIRP_CONTEXT IrpContext, _In_ PTHREAD_CONTEXT ThreadContext)
Definition: cddata.c:981
#define ASSERT_OPTIONAL_IRP(I)
Definition: cddata.h:251
NTSTATUS CdCompleteMdl(_In_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
Definition: cachesup.c:411
VOID CdCleanupIrpContext(_In_ PIRP_CONTEXT IrpContext, _In_ BOOLEAN Post)
Definition: strucsup.c:1733
#define CanFsdWait(I)
Definition: cdprocs.h:2001
NTSTATUS CdCommonLockControl(_Inout_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
Definition: lockctrl.c:35
NTSTATUS CdCommonDevControl(_Inout_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
Definition: devctrl.c:46
_Ret_valid_ PIRP_CONTEXT CdCreateIrpContext(_In_ PIRP Irp, _In_ BOOLEAN Wait)
Definition: strucsup.c:1573
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define IRP_CONTEXT_FLAG_MORE_PROCESSING
Definition: cdstruc.h:1214
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CDFS_NTC_IRP_CONTEXT
Definition: nodetype.h:34
#define SafeNodeType(Ptr)
Definition: nodetype.h:54
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define SetFlag(_F, _SF)
Definition: ext2fs.h:187
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
Status
Definition: gdiplustypes.h:25
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1843
#define STATUS_CANT_WAIT
Definition: ntstatus.h:452
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_GetExceptionInformation()
Definition: pseh2_64.h:164
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
#define IRP_MN_COMPLETE
Definition: iotypes.h:4420
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MJ_SHUTDOWN
#define IRP_MJ_CLEANUP
#define NT_ASSERT
Definition: rtlfuncs.h:3324

◆ _IRQL_requires_max_() [2/2]

_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Queries information details about a security descriptor.

Computes the quota size of a security descriptor.

Assigns a security descriptor for a new object.

An extended function that assigns a security descriptor for a new object.

Frees a security descriptor.

An extended function that sets new information data to a security descriptor.

Modifies some information data about a security descriptor.

Parameters
[in]SecurityInformationSecurity information details to be queried from a security descriptor.
[out]SecurityDescriptorThe returned security descriptor with security information data.
[in,out]LengthThe returned length of a security descriptor.
[in,out]ObjectsSecurityDescriptorThe returned object security descriptor.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the specific information about the security descriptor has been queried. STATUS_BUFFER_TOO_SMALL is returned if the buffer size is too small to contain the queried info about the security descriptor.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
See SeSetSecurityDescriptorInfoEx.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]AutoInheritFlagsFlags bitmask inheritation, influencing how the security descriptor can be inherited and if it can be in the first place.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
Returns STATUS_SUCCESS if the operations have been completed without problems and that new info has been set to the security descriptor. STATUS_NO_SECURITY_ON_OBJECT is returned if the object does not have a security descriptor. STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the new security descriptor with new info set has failed.
Parameters
[in]SecurityDescriptorA security descriptor to be freed from memory.
Returns
Returns STATUS_SUCCESS.
Parameters
[in]_ParentDescriptorA security descriptor of the parent object that is being created.
[in]_ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]ObjectTypeThe type of the new object.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]AutoInheritFlagsAutomatic inheritance flags that influence how access control entries within ACLs from security descriptors are inherited.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the security descriptor has been assigned to the new object. STATUS_NO_TOKEN is returned if the caller hasn't supplied a valid argument to a security subject context. STATUS_INVALID_OWNER is returned if the caller hasn't supplied a parent descriptor that belongs to the main user (owner). STATUS_INVALID_PRIMARY_GROUP is returned by the same reason as with the previous NTSTATUS code. The two NTSTATUS codes are returned if the calling thread stated that the owner and/or group is defaulted to the parent descriptor (SEF_DEFAULT_OWNER_FROM_PARENT and/or SEF_DEFAULT_GROUP_FROM_PARENT respectively). STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the descriptor buffer has failed. A failure NTSTATUS is returned otherwise.
Parameters
[in]ParentDescriptorA security descriptor of the parent object that is being created.
[in]ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
See SeAssignSecurityEx.
Parameters
[in]SecurityDescriptorA security descriptor.
[out]QuotaInfoSizeThe returned quota size of the given security descriptor to the caller. The function may return 0 to this parameter if the descriptor doesn't have a group or a discretionary access control list (DACL) even.
Returns
Returns STATUS_SUCCESS if the quota size of a security descriptor has been computed successfully. STATUS_UNKNOWN_REVISION is returned if the security descriptor has an invalid revision.

Definition at line 923 of file Messaging.c.

75{
76 PFLT_SERVER_PORT_OBJECT PortObject;
78
79 /* The caller must allow at least one connection */
80 if (MaxConnections == 0)
81 {
83 }
84
85 /* The request must be for a kernel handle */
86 if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87 {
89 }
90
91 /*
92 * Get rundown protection on the target to stop the owner
93 * from unloading whilst this port object is open. It gets
94 * removed in the FltpServerPortClose callback
95 */
97 if (!NT_SUCCESS(Status))
98 {
99 return Status;
100 }
101
102 /* Create the server port object for this filter */
107 NULL,
109 0,
110 0,
111 (PVOID *)&PortObject);
112 if (NT_SUCCESS(Status))
113 {
114 /* Zero out the struct */
115 RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116
117 /* Increment the ref count on the target filter */
119
120 /* Setup the filter port object */
121 PortObject->Filter = Filter;
125 PortObject->Cookie = ServerPortCookie;
126 PortObject->MaxConnections = MaxConnections;
127
128 /* Insert the object */
129 Status = ObInsertObject(PortObject,
130 NULL,
132 0,
133 NULL,
135 if (NT_SUCCESS(Status))
136 {
137 /* Lock the connection list */
139
140 /* Add the new port object to the connection list and increment the count */
143
144 /* Unlock the connection list*/
146 }
147 }
148
149 if (!NT_SUCCESS(Status))
150 {
151 /* Allow the filter to be cleaned up */
153 }
154
155 return Status;
156}
static const INTERNET_PORT ServerPort
Definition: CWebService.cpp:11
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
_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:1877
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1875
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1874
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1876
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
static LONG MaxConnections
#define KernelMode
Definition: asm.h:34
#define FILE_READ_DATA
Definition: nt_native.h:628
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
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:2935
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:1039
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121
LIST_ENTRY mList
Definition: fltmgrint.h:56
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

◆ _Out_writes_bytes_opt_()

_In_ ULONG _Out_writes_bytes_opt_ ( OutputBufferLength  )

◆ NtCancelDeviceWakeupRequest()

NTSYSCALLAPI NTSTATUS NTAPI NtCancelDeviceWakeupRequest ( _In_ HANDLE  Device)

◆ NtRequestDeviceWakeup()

NTSYSCALLAPI NTSTATUS NTAPI NtRequestDeviceWakeup ( _In_ HANDLE  Device)

◆ NtRequestWakeupLatency()

NTSYSCALLAPI NTSTATUS NTAPI NtRequestWakeupLatency ( _In_ LATENCY_TIME  latency)

Variable Documentation

◆ Asynchronous

◆ Context

Definition at line 222 of file ntpoapi.h.

◆ Entering

_In_ PVOID _In_ BOOLEAN Entering

Definition at line 223 of file ntpoapi.h.

◆ Flags

Definition at line 304 of file ntpoapi.h.

◆ IdleTimes

Definition at line 157 of file ntpoapi.h.

◆ InputBufferLength

Definition at line 238 of file ntpoapi.h.

◆ MinSystemState

_In_ SYSTEM_POWER_STATE MinSystemState

Definition at line 303 of file ntpoapi.h.

Referenced by NtSetSystemPowerState().

◆ Number

_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile* Number

Definition at line 207 of file ntpoapi.h.

Referenced by $endif(), AcpiUtFormatNumber(), AcpiUtPrintNumber(), AcpiUtPutNumber(), AcpiUtScanNumber(), AddCommas(), CcRemapBcb(), CcRepinBcb(), CmpDoFindSubKeyByNumber(), CmpFindSubKeyByNumber(), CDFParser::DoCabinetName(), CDFParser::DoDiskLabel(), CDFParser::DoMaxDiskSize(), DumpBTreeKey(), DumpBTreeNode(), Ext2AddBlockExtent(), Ext2BlockMap(), Ext2DoExtentExpand(), Ext2ExpandBlock(), Ext2ExpandExtent(), Ext2ExpandLast(), Ext2FirstUnusedMcb(), Ext2FreeBlock(), Ext2GetBlock(), Ext2MapExtent(), Ext2MapIndirect(), Ext2NewBlock(), Ext2RemoveBlockExtent(), Ext2TruncateBlock(), FAST486_OPCODE_HANDLER(), Fast486GetIntVector(), Fast486PerformInterrupt(), FindMUIEntriesOfPage(), GetDigitCount(), CDFParser::GetDiskName(), CDFParser::GetDiskNumber(), GetHandle(), HalpLookupHandler(), HalpRegisterInternalBusHandlers(), hGetPEBHandle(), IsPowerOf2(), KdpGetContext(), KdpSetContext(), KeAddSystemServiceTable(), KeConnectInterrupt(), KeFindNextRightSetAffinity(), KeGetCurrentProcessorNumber(), KeSetTargetProcessorDpc(), KiInitializeKernel(), KiInitSpinLocks(), KiScanReadyQueues(), KiSystemService(), MUIGetString(), CDFParser::OnCabinetName(), CDFParser::OnDiskLabel(), ParseNumber(), ParseRedirection(), CDFParser::PerformSetCommand(), PicInterruptRequest(), PrintNum(), RtlGetCallersAddress(), RtlIpv6StringToAddressW(), CDFParser::SetDiskName(), CDFParser::SetDiskNumber(), SetHandle(), START_TEST(), test_query_processor_power_info(), VbeGetModeByNumber(), vsnprintf(), VTUTF8ChannelConsumeEscapeSequence(), VTUTF8ChannelScanForNumber(), and WSAAsyncGetProtoByNumber().

◆ NumberProcessors

_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG NumberProcessors

Definition at line 206 of file ntpoapi.h.

◆ OutputBufferLength

Definition at line 240 of file ntpoapi.h.

◆ PreviousFlags

_Out_ EXECUTION_STATE* PreviousFlags

Definition at line 288 of file ntpoapi.h.

Referenced by NtSetThreadExecutionState().

◆ State

Definition at line 324 of file ntpoapi.h.

◆ SystemContext

_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID SystemContext

Definition at line 205 of file ntpoapi.h.

◆ SystemHandler

_In_opt_ PENTER_STATE_SYSTEM_HANDLER SystemHandler

Definition at line 204 of file ntpoapi.h.