ReactOS  r75400
classpnp.h File Reference
#include <ntdddisk.h>
#include <ntddcdrm.h>
#include <ntddtape.h>
#include <ntddscsi.h>
#include <ntddstor.h>
#include <stdio.h>
#include <scsi.h>
Include dependency graph for classpnp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _DICTIONARY
 
struct  _CLASSPNP_SCAN_FOR_SPECIAL_INFO
 
struct  _SRB_HISTORY_ITEM
 
struct  _SRB_HISTORY
 
struct  GUIDREGINFO
 
struct  _CLASS_WMI_INFO
 
struct  _CLASS_DEV_INFO
 
struct  _CLASS_INIT_DATA
 
struct  _FILE_OBJECT_EXTENSION
 
struct  _CLASS_WORKING_SET
 
struct  _CLASS_INTERPRET_SENSE_INFO2
 
struct  _CLASS_DRIVER_EXTENSION
 
struct  _COMMON_DEVICE_EXTENSION
 
struct  _PHYSICAL_DEVICE_EXTENSION
 
struct  _CLASS_POWER_OPTIONS
 
struct  _CLASS_POWER_CONTEXT
 
struct  _COMPLETION_CONTEXT
 
struct  _CLASS_QUERY_WMI_REGINFO_EX_LIST
 
struct  _FUNCTIONAL_DEVICE_EXTENSION
 

Macros

#define _CLASS_
 
#define max(a, b)   (((a) > (b)) ? (a) : (b))
 
#define min(a, b)   (((a) < (b)) ? (a) : (b))
 
#define SRB_CLASS_FLAGS_LOW_PRIORITY   0x10000000
 
#define SRB_CLASS_FLAGS_PERSISTANT   0x20000000
 
#define SRB_CLASS_FLAGS_PAGING   0x40000000
 
#define SRB_CLASS_FLAGS_FREE_MDL   0x80000000
 
#define ASSERT_FDO(x)   ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)
 
#define ASSERT_PDO(x)   ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo))
 
#define IS_CLEANUP_REQUEST(majorFunction)
 
#define DO_MCD(fdoExtension)
 
#define IS_SCSIOP_READ(opCode)
 
#define IS_SCSIOP_WRITE(opCode)
 
#define IS_SCSIOP_READWRITE(opCode)   (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode))
 
#define ADJUST_FUA_FLAG(fdoExt)
 
#define FREE_POOL(_PoolPtr)
 
#define CLASS_TAG_AUTORUN_DISABLE   'ALcS'
 
#define CLASS_TAG_FILE_OBJECT_EXTENSION   'FLcS'
 
#define CLASS_TAG_MEDIA_CHANGE_DETECTION   'MLcS'
 
#define CLASS_TAG_MOUNT   'mLcS'
 
#define CLASS_TAG_RELEASE_QUEUE   'qLcS'
 
#define CLASS_TAG_POWER   'WLcS'
 
#define CLASS_TAG_WMI   'wLcS'
 
#define CLASS_TAG_FAILURE_PREDICT   'fLcS'
 
#define CLASS_TAG_DEVICE_CONTROL   'OIcS'
 
#define CLASS_TAG_MODE_DATA   'oLcS'
 
#define CLASS_TAG_MULTIPATH   'mPcS'
 
#define MAXIMUM_RETRIES   4
 
#define CLASS_DRIVER_EXTENSION_KEY   ((PVOID) ClassInitialize)
 
#define NO_REMOVE   0
 
#define REMOVE_PENDING   1
 
#define REMOVE_COMPLETE   2
 
#define ClassAcquireRemoveLock(devobj, tag)   ClassAcquireRemoveLockEx(devobj, tag, __FILE__, __LINE__)
 
#define TRY
 
#define LEAVE   goto __tryLabel;
 
#define FINALLY   __tryLabel:
 
#define DebugPrint(x)
 
#define DEBUG_BUFFER_LENGTH   256
 
#define START_UNIT_TIMEOUT   (60 * 4)
 
#define MEDIA_CHANGE_DEFAULT_TIME   1
 
#define MEDIA_CHANGE_TIMEOUT_TIME   300
 
#define ClasspAllocateSrb(ext)
 
#define ClasspFreeSrb(ext, srb)
 
#define SET_FLAG(Flags, Bit)   ((Flags) |= (Bit))
 
#define CLEAR_FLAG(Flags, Bit)   ((Flags) &= ~(Bit))
 
#define TEST_FLAG(Flags, Bit)   (((Flags) & (Bit)) != 0)
 
#define CLASS_WORKING_SET_MAXIMUM   2048
 
#define CLASS_INTERPRET_SENSE_INFO2_MAXIMUM_HISTORY_COUNT   30000
 
#define CLASS_SPECIAL_DISABLE_SPIN_DOWN   0x00000001
 
#define CLASS_SPECIAL_DISABLE_SPIN_UP   0x00000002
 
#define CLASS_SPECIAL_NO_QUEUE_LOCK   0x00000008
 
#define CLASS_SPECIAL_DISABLE_WRITE_CACHE   0x00000010
 
#define CLASS_SPECIAL_CAUSE_NOT_REPORTABLE_HACK   0x00000020
 
#define CLASS_SPECIAL_DISABLE_WRITE_CACHE_NOT_SUPPORTED   0x00000040
 
#define CLASS_SPECIAL_MODIFY_CACHE_UNSUCCESSFUL   0x00000040
 
#define CLASS_SPECIAL_FUA_NOT_SUPPORTED   0x00000080
 
#define CLASS_SPECIAL_VALID_MASK   0x000000FB
 
#define CLASS_SPECIAL_RESERVED   (~CLASS_SPECIAL_VALID_MASK)
 
#define DEV_WRITE_CACHE   0x00000001
 
#define DEV_USE_SCSI1   0x00000002
 
#define DEV_SAFE_START_UNIT   0x00000004
 
#define DEV_NO_12BYTE_CDB   0x00000008
 
#define DEV_POWER_PROTECTED   0x00000010
 
#define DEV_USE_16BYTE_CDB   0x00000020
 
#define GUID_CLASSPNP_QUERY_REGINFOEX   {0x00e34b11, 0x2444, 0x4745, {0xa5, 0x3d, 0x62, 0x01, 0x00, 0xcd, 0x82, 0xf7}}
 
#define GUID_CLASSPNP_SENSEINFO2   {0x509a8c5f, 0x71d7, 0x48f6, {0x82, 0x1e, 0x17, 0x3c, 0x49, 0xbf, 0x2f, 0x18}}
 
#define GUID_CLASSPNP_WORKING_SET   {0x105701b0, 0x9e9b, 0x47cb, {0x97, 0x80, 0x81, 0x19, 0x8a, 0xf7, 0xb5, 0x24}}
 
#define DEFAULT_FAILURE_PREDICTION_PERIOD   60 * 60 * 1
 
#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS   (0x3b9aca00)
 

Typedefs

typedef enum
_MEDIA_CHANGE_DETECTION_STATE 
MEDIA_CHANGE_DETECTION_STATE
 
typedef enum
_MEDIA_CHANGE_DETECTION_STATE
PMEDIA_CHANGE_DETECTION_STATE
 
typedef enum _CLASS_DEBUG_LEVEL CLASS_DEBUG_LEVEL
 
typedef enum _CLASS_DEBUG_LEVELPCLASS_DEBUG_LEVEL
 
typedef enum
FAILURE_PREDICTION_METHOD
PFAILURE_PREDICTION_METHOD
 
typedef struct _CLASS_INIT_DATA CLASS_INIT_DATA
 
typedef struct _CLASS_INIT_DATAPCLASS_INIT_DATA
 
typedef struct
_CLASS_PRIVATE_FDO_DATA 
CLASS_PRIVATE_FDO_DATA
 
typedef struct
_CLASS_PRIVATE_FDO_DATA
PCLASS_PRIVATE_FDO_DATA
 
typedef struct
_CLASS_PRIVATE_PDO_DATA 
CLASS_PRIVATE_PDO_DATA
 
typedef struct
_CLASS_PRIVATE_PDO_DATA * 
PCLASS_PRIVATE_PDO_DATA
 
typedef struct
_CLASS_PRIVATE_COMMON_DATA 
CLASS_PRIVATE_COMMON_DATA
 
typedef struct
_CLASS_PRIVATE_COMMON_DATA * 
PCLASS_PRIVATE_COMMON_DATA
 
typedef struct
_MEDIA_CHANGE_DETECTION_INFO 
MEDIA_CHANGE_DETECTION_INFO
 
typedef struct
_MEDIA_CHANGE_DETECTION_INFO
PMEDIA_CHANGE_DETECTION_INFO
 
typedef struct _DICTIONARY DICTIONARY
 
typedef struct _DICTIONARYPDICTIONARY
 
typedef struct
_CLASSPNP_SCAN_FOR_SPECIAL_INFO 
CLASSPNP_SCAN_FOR_SPECIAL_INFO
 
typedef struct
_CLASSPNP_SCAN_FOR_SPECIAL_INFO
PCLASSPNP_SCAN_FOR_SPECIAL_INFO
 
typedef NTSTATUS(NTAPIPCLASS_POWER_DEVICE )(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
 
typedef struct _SRB_HISTORY_ITEM SRB_HISTORY_ITEM
 
typedef struct _SRB_HISTORY_ITEMPSRB_HISTORY_ITEM
 
typedef struct _SRB_HISTORY SRB_HISTORY
 
typedef struct _SRB_HISTORYPSRB_HISTORY
 
typedef struct GUIDREGINFOPGUIDREGINFO
 
typedef struct _CLASS_WMI_INFO CLASS_WMI_INFO
 
typedef struct _CLASS_WMI_INFOPCLASS_WMI_INFO
 
typedef struct _CLASS_DEV_INFO CLASS_DEV_INFO
 
typedef struct _CLASS_DEV_INFOPCLASS_DEV_INFO
 
typedef struct
_FILE_OBJECT_EXTENSION 
FILE_OBJECT_EXTENSION
 
typedef struct
_FILE_OBJECT_EXTENSION
PFILE_OBJECT_EXTENSION
 
typedef struct _CLASS_WORKING_SET CLASS_WORKING_SET
 
typedef struct _CLASS_WORKING_SETPCLASS_WORKING_SET
 
typedef struct
_CLASS_INTERPRET_SENSE_INFO2 
CLASS_INTERPRET_SENSE_INFO2
 
typedef struct
_CLASS_INTERPRET_SENSE_INFO2
PCLASS_INTERPRET_SENSE_INFO2
 
typedef struct
_CLASS_DRIVER_EXTENSION 
CLASS_DRIVER_EXTENSION
 
typedef struct
_CLASS_DRIVER_EXTENSION
PCLASS_DRIVER_EXTENSION
 
typedef struct
_COMMON_DEVICE_EXTENSION 
COMMON_DEVICE_EXTENSION
 
typedef struct
_COMMON_DEVICE_EXTENSION
PCOMMON_DEVICE_EXTENSION
 
typedef struct
_PHYSICAL_DEVICE_EXTENSION 
PHYSICAL_DEVICE_EXTENSION
 
typedef struct
_PHYSICAL_DEVICE_EXTENSION
PPHYSICAL_DEVICE_EXTENSION
 
typedef struct _CLASS_POWER_OPTIONS CLASS_POWER_OPTIONS
 
typedef struct
_CLASS_POWER_OPTIONS
PCLASS_POWER_OPTIONS
 
typedef struct _CLASS_POWER_CONTEXT CLASS_POWER_CONTEXT
 
typedef struct
_CLASS_POWER_CONTEXT
PCLASS_POWER_CONTEXT
 
typedef struct _COMPLETION_CONTEXT COMPLETION_CONTEXT
 
typedef struct
_COMPLETION_CONTEXT
PCOMPLETION_CONTEXT
 
typedef struct
_CLASS_QUERY_WMI_REGINFO_EX_LIST 
CLASS_QUERY_WMI_REGINFO_EX_LIST
 
typedef struct
_CLASS_QUERY_WMI_REGINFO_EX_LIST
PCLASS_QUERY_WMI_REGINFO_EX_LIST
 
typedef struct
_FUNCTIONAL_DEVICE_EXTENSION 
FUNCTIONAL_DEVICE_EXTENSION
 
typedef struct
_FUNCTIONAL_DEVICE_EXTENSION
PFUNCTIONAL_DEVICE_EXTENSION
 

Enumerations

enum  _MEDIA_CHANGE_DETECTION_STATE { MediaUnknown, MediaPresent, MediaNotPresent, MediaUnavailable }
 
enum  _CLASS_DEBUG_LEVEL {
  ClassDebugError = 0, ClassDebugWarning = 1, ClassDebugTrace = 2, ClassDebugInfo = 3,
  ClassDebugMediaLocks = 8, ClassDebugMCN = 9, ClassDebugDelayedRetry = 10, ClassDebugSenseInfo = 11,
  ClassDebugRemoveLock = 12, ClassDebugExternal4 = 13, ClassDebugExternal3 = 14, ClassDebugExternal2 = 15,
  ClassDebugExternal1 = 16
}
 
enum  CLASSENABLEDISABLEFUNCTION { EventGeneration, DataBlockCollection }
 
enum  FAILURE_PREDICTION_METHOD { FailurePredictionNone = 0, FailurePredictionIoctl, FailurePredictionSmart, FailurePredictionSense }
 
enum  CLASS_POWER_DOWN_STATE {
  PowerDownDeviceInitial, PowerDownDeviceLocked, PowerDownDeviceStopped, PowerDownDeviceOff,
  PowerDownDeviceUnlocked
}
 
enum  CLASS_POWER_DOWN_STATE2 {
  PowerDownDeviceInitial2, PowerDownDeviceLocked2, PowerDownDeviceFlushed2, PowerDownDeviceStopped2,
  PowerDownDeviceOff2, PowerDownDeviceUnlocked2
}
 
enum  CLASS_POWER_UP_STATE {
  PowerUpDeviceInitial, PowerUpDeviceLocked, PowerUpDeviceOn, PowerUpDeviceStarted,
  PowerUpDeviceUnlocked
}
 

Functions

static ULONG CountOfSetBitsUChar (UCHAR _X)
 
static ULONG CountOfSetBitsULong (ULONG _X)
 
static ULONG CountOfSetBitsULong32 (ULONG32 _X)
 
static ULONG CountOfSetBitsULong64 (ULONG64 _X)
 
static ULONG CountOfSetBitsUlongPtr (ULONG_PTR _X)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) typedef VOID(NTAPI *PCLASS_ERROR)(_In_ PDEVICE_OBJECT DeviceObject
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) typedef NTSTATUS(NTAPI *PCLASS_ADD_DEVICE)(_In_ PDRIVER_OBJECT DriverObject
 
 _IRQL_requires_ (DISPATCH_LEVEL) typedef VOID(NTAPI *PCLASS_TICK)(_In_ PDEVICE_OBJECT DeviceObject)
 
_In_ PIRP _In_ ULONG _In_ ULONG _Out_writes_bytes_ (BufferAvail) PUCHAR Buffer)
 
_In_ PIRP _In_ ULONG _In_ ULONG _In_reads_bytes_ (BufferSize) PUCHAR Buffer)
 
_In_ PIRP _In_ ULONG _In_
ULONG _In_ ULONG _In_ ULONG 
_In_reads_ (_Inexpressible_(max(InBufferSize, OutBufferSize))) PUCHAR Buffer)
 
_In_opt_ PIRP _In_
PSCSI_REQUEST_BLOCK _In_ UCHAR
_In_ ULONG _In_ ULONG _In_opt_
SRB_HISTORY _Out_ NTSTATUS
_Out_ 
_Deref_out_range_ (0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIn100nsUnits)
 
 C_ASSERT ((MAXULONG-sizeof(SRB_HISTORY))/30000 >=sizeof(SRB_HISTORY_ITEM))
 
_In_z_ PCCHAR _In_
PDEVICE_OBJECT _In_ BOOLEAN
_Outptr_result_nullonfailure_
_At_
DeviceObject (Mem) __drv_aliasesMem) PDEVICE_OBJECT *DeviceObject
 
_Must_inspect_result_
SCSIPORTAPI NTSTATUS NTAPI 
ClassReadDriveCapacity (_In_ PDEVICE_OBJECT DeviceObject)
 
SCSIPORTAPI VOID NTAPI ClassReleaseQueue (_In_ PDEVICE_OBJECT DeviceObject)
 
SCSIPORTAPI VOID NTAPI ClassSplitRequest (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ ULONG MaximumBytes)
 
SCSIPORTAPI NTSTATUS NTAPI ClassDeviceControl (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp)
 
SCSIPORTAPI NTSTATUS NTAPI ClassIoComplete (PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
 
SCSIPORTAPI NTSTATUS NTAPI ClassIoCompleteAssociated (PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
 
SCSIPORTAPI BOOLEAN NTAPI ClassInterpretSenseInfo (_In_ PDEVICE_OBJECT DeviceObject, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ UCHAR MajorFunctionCode, _In_ ULONG IoDeviceCode, _In_ ULONG RetryCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, 100) ULONG *RetryInterval)
 
VOID NTAPI ClassSendDeviceIoControlSynchronous (_In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT TargetDeviceObject, _Inout_updates_opt_(_Inexpressible_(max(InputBufferLength, OutputBufferLength))) PVOID Buffer, _In_ ULONG InputBufferLength, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _Out_ PIO_STATUS_BLOCK IoStatus)
 
SCSIPORTAPI NTSTATUS NTAPI ClassSendIrpSynchronous (_In_ PDEVICE_OBJECT TargetDeviceObject, _In_ PIRP Irp)
 
SCSIPORTAPI NTSTATUS NTAPI ClassForwardIrpSynchronous (_In_ PCOMMON_DEVICE_EXTENSION CommonExtension, _In_ PIRP Irp)
 
SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbSynchronous (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_reads_bytes_opt_(BufferLength) PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
 
SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbAsynchronous (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PSCSI_REQUEST_BLOCK Srb, _In_ PIRP Irp, _In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID BufferAddress, _In_ ULONG BufferLength, _In_ BOOLEAN WriteToDevice)
 
SCSIPORTAPI NTSTATUS NTAPI ClassBuildRequest (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
 
SCSIPORTAPI ULONG NTAPI ClassModeSense (_In_ PDEVICE_OBJECT DeviceObject, _In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode)
 
SCSIPORTAPI PVOID NTAPI ClassFindModePage (_In_reads_bytes_(Length) PCHAR ModeSenseBuffer, _In_ ULONG Length, _In_ UCHAR PageMode, _In_ BOOLEAN Use6Byte)
 
SCSIPORTAPI NTSTATUS NTAPI ClassInternalIoControl (PDEVICE_OBJECT DeviceObject, PIRP Irp)
 
SCSIPORTAPI VOID ClassDebugPrint (_In_ CLASS_DEBUG_LEVEL DebugPrintLevel, _In_z_ PCCHAR DebugMessage,...)
 
SCSIPORTAPI VOID NTAPI ClassCompleteRequest (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ CCHAR PriorityBoost)
 
SCSIPORTAPI VOID NTAPI ClassReleaseRemoveLock (_In_ PDEVICE_OBJECT DeviceObject, PIRP Tag)
 
SCSIPORTAPI ULONG NTAPI ClassAcquireRemoveLockEx (_In_ PDEVICE_OBJECT DeviceObject, PVOID Tag, _In_ PCSTR File, _In_ ULONG Line)
 
_In_ PCHAR _In_ ULONG _In_reads_bytes_opt_ (InquiryDataLength) PINQUIRYDATA InquiryData
 
SCSIPORTAPI NTSTATUS NTAPI ClassWmiCompleteRequest (_In_ PDEVICE_OBJECT DeviceObject, _Inout_ PIRP Irp, _In_ NTSTATUS Status, _In_ ULONG BufferUsed, _In_ CCHAR PriorityBoost)
 
_In_ LPGUID _In_ ULONG _In_ ULONG _In_reads_bytes_ (EventDataSize) PVOID EventData)
 
SCSIPORTAPI VOID NTAPI ClassResetMediaChangeTimer (_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
 
SCSIPORTAPI PVPB NTAPI ClassGetVpb (_In_ PDEVICE_OBJECT DeviceObject)
 
SCSIPORTAPI NTSTATUS NTAPI ClassSpinDownPowerHandler (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
 
NTSTATUS NTAPI ClassStopUnitPowerHandler (_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
 
SCSIPORTAPI VOID NTAPI ClassReleaseChildLock (_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
 
VOID NTAPI ClassSendStartUnit (_In_ PDEVICE_OBJECT DeviceObject)
 
SCSIPORTAPI NTSTATUS NTAPI ClassAsynchronousCompletion (PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Event)
 
SCSIPORTAPI VOID NTAPI ClassCheckMediaState (_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
 
SCSIPORTAPI NTSTATUS NTAPI ClassCheckVerifyComplete (PDEVICE_OBJECT DeviceObject, PIRP Irp, PVOID Context)
 
_In_ const GUID _In_ ULONG _In_reads_bytes_opt_ (ExtraDataSize) PVOID ExtraData)
 
static __inline BOOLEAN PORT_ALLOCATED_SENSE (_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
 
static __inline VOID FREE_PORT_ALLOCATED_SENSE_BUFFER (_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
 

Variables

_In_ PSCSI_REQUEST_BLOCK Srb
 
_In_ PSCSI_REQUEST_BLOCK _Out_
NTSTATUS
Status
 
_In_ PSCSI_REQUEST_BLOCK _Out_
NTSTATUS _Inout_ BOOLEAN
Retry
 
_In_ PDEVICE_OBJECT Pdo
 
_In_ UCHAR Type
 
_In_ PIRP Irp
 
_In_ BUS_QUERY_ID_TYPE IdType
 
_In_ BUS_QUERY_ID_TYPE _In_
PUNICODE_STRING 
IdString
 
_In_ PDEVICE_CAPABILITIES Capabilities
 
_Out_ ULONGRegFlags
 
_Out_ ULONG _Out_ PUNICODE_STRING Name
 
_Out_ ULONG _Out_
PUNICODE_STRING _Out_
PUNICODE_STRING 
MofResourceName
 
_In_ PIRP _In_ ULONG GuidIndex
 
_In_ PIRP _In_ ULONG _In_ ULONG BufferAvail
 
_In_ PIRP _In_ ULONG _In_ ULONG BufferSize
 
_In_ PIRP _In_ ULONG _In_ ULONG DataItemId
 
_In_ PIRP _In_ ULONG _In_ ULONG MethodId
 
_In_ PIRP _In_ ULONG _In_
ULONG _In_ ULONG 
InBufferSize
 
_In_ PIRP _In_ ULONG _In_
ULONG _In_ ULONG _In_ ULONG 
OutBufferSize
 
_In_ PIRP _In_ ULONG _In_
CLASSENABLEDISABLEFUNCTION 
Function
 
_In_ PIRP _In_ ULONG _In_
CLASSENABLEDISABLEFUNCTION
_In_ BOOLEAN 
Enable
 
_In_opt_ PIRP OriginalRequest
 
_In_opt_ PIRP _In_
PSCSI_REQUEST_BLOCK _In_ UCHAR 
MajorFunctionCode
 
_In_opt_ PIRP _In_
PSCSI_REQUEST_BLOCK _In_ UCHAR
_In_ ULONG 
IoDeviceCode
 
_In_opt_ PIRP _In_
PSCSI_REQUEST_BLOCK _In_ UCHAR
_In_ ULONG _In_ ULONG 
PreviousRetryCount
 
_In_opt_ PIRP _In_
PSCSI_REQUEST_BLOCK _In_ UCHAR
_In_ ULONG _In_ ULONG _In_opt_
SRB_HISTORY
RequestHistory
 
_In_ PVOID Argument2
 
_In_ PVOID _In_ PCLASS_INIT_DATA InitializationData
 
_In_ LPGUID Guid
 
_In_ LPGUID _In_ PVOID Data
 
_In_z_ PCCHAR ObjectNameBuffer
 
_In_z_ PCCHAR _In_ PDEVICE_OBJECT LowerDeviceObject
 
_In_z_ PCCHAR _In_
PDEVICE_OBJECT _In_ BOOLEAN 
IsFdo
 
_In_ BOOLEAN Release
 
_In_ ULONG NumberElements
 
_In_ PSTORAGE_PROPERTY_ID PropertyId
 
_In_ PSTORAGE_PROPERTY_ID
_Outptr_
PSTORAGE_DESCRIPTOR_HEADER
Descriptor
 
_In_ BOOLEAN AcquireChildLock
 
_In_ PCHAR DeviceName
 
_In_ PCHAR _In_ ULONG DeviceNumber
 
_In_ PCHAR _In_ ULONG _In_ ULONG InquiryDataLength
 
_In_ LPGUID _In_ ULONG InstanceIndex
 
_In_ LPGUID _In_ ULONG _In_ ULONG EventDataSize
 
_In_ PUCHAR EventPrefix
 
_In_ BOOLEAN AllowDriveToSleep
 
_In_ FAILURE_PREDICTION_METHOD FailurePredictionMethod
 
_In_ FAILURE_PREDICTION_METHOD
_In_ ULONG 
PollingPeriod
 
_In_ ULONG _In_ BOOLEAN LogError
 
_In_ ULONG _In_ BOOLEAN _In_ ULONG UniqueErrorValue
 
_In_ ULONG _In_ BOOLEAN _In_
ULONG _In_ UCHAR 
PathId
 
_In_ ULONG _In_ BOOLEAN _In_
ULONG _In_ UCHAR _In_ UCHAR 
TargetId
 
_In_ ULONG _In_ BOOLEAN _In_
ULONG _In_ UCHAR _In_ UCHAR
_In_ UCHAR 
Lun
 
IO_COMPLETION_ROUTINE ClassSignalCompletion
 
_In_ UCHAR RemoveType
 
_In_ MEDIA_CHANGE_DETECTION_STATE State
 
_In_
MEDIA_CHANGE_DETECTION_STATE
_In_ BOOLEAN 
Wait
 
_In_opt_ PWSTR SubkeyName
 
_In_opt_ PWSTR _In_ PWSTR ParameterName
 
_In_opt_ PWSTR _In_ PWSTR
_Inout_ PULONG 
ParameterValue
 
_In_ PFILE_OBJECT FileObject
 
_In_ const GUID _In_ ULONG ExtraDataSize
 
_In_ CLASSPNP_SCAN_FOR_SPECIAL_INFO DeviceList []
 

Macro Definition Documentation

#define _CLASS_

Definition at line 4 of file classpnp.h.

#define ADJUST_FUA_FLAG (   fdoExt)
Value:
{ \
if (TEST_FLAG(fdoExt->DeviceFlags, DEV_WRITE_CACHE) && \
!TEST_FLAG(fdoExt->DeviceFlags, DEV_POWER_PROTECTED) && \
!TEST_FLAG(fdoExt->ScanForSpecialFlags, CLASS_SPECIAL_FUA_NOT_SUPPORTED) ) { \
fdoExt->CdbForceUnitAccess = TRUE; \
} else { \
fdoExt->CdbForceUnitAccess = FALSE; \
} \
}
#define CLASS_SPECIAL_FUA_NOT_SUPPORTED
Definition: classpnp.h:171
#define TRUE
Definition: types.h:120
#define TEST_FLAG(Flags, Bit)
Definition: classpnp.h:156
#define FALSE
Definition: types.h:117
#define DEV_POWER_PROTECTED
Definition: classpnp.h:179
#define DEV_WRITE_CACHE
Definition: classpnp.h:175
if(!(yy_init))
Definition: macro.lex.yy.c:704

Definition at line 53 of file classpnp.h.

#define ASSERT_FDO (   x)    ASSERT(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo)

Definition at line 24 of file classpnp.h.

#define ASSERT_PDO (   x)    ASSERT(!(((PCOMMON_DEVICE_EXTENSION) (x)->DeviceExtension)->IsFdo))

Definition at line 27 of file classpnp.h.

#define CLASS_INTERPRET_SENSE_INFO2_MAXIMUM_HISTORY_COUNT   30000

Definition at line 160 of file classpnp.h.

#define CLASS_SPECIAL_CAUSE_NOT_REPORTABLE_HACK   0x00000020

Definition at line 166 of file classpnp.h.

#define CLASS_SPECIAL_DISABLE_SPIN_DOWN   0x00000001

Definition at line 162 of file classpnp.h.

Referenced by ClassSpinDownPowerHandler(), and DiskSetSpecialHacks().

#define CLASS_SPECIAL_DISABLE_SPIN_UP   0x00000002
#define CLASS_SPECIAL_DISABLE_WRITE_CACHE   0x00000010
#define CLASS_SPECIAL_DISABLE_WRITE_CACHE_NOT_SUPPORTED   0x00000040

Definition at line 168 of file classpnp.h.

Referenced by DisableWriteCache(), DiskDeviceControl(), and DiskScanRegistryForSpecial().

#define CLASS_SPECIAL_FUA_NOT_SUPPORTED   0x00000080

Definition at line 171 of file classpnp.h.

#define CLASS_SPECIAL_MODIFY_CACHE_UNSUCCESSFUL   0x00000040

Definition at line 170 of file classpnp.h.

#define CLASS_SPECIAL_NO_QUEUE_LOCK   0x00000008
#define CLASS_SPECIAL_RESERVED   (~CLASS_SPECIAL_VALID_MASK)

Definition at line 173 of file classpnp.h.

#define CLASS_SPECIAL_VALID_MASK   0x000000FB

Definition at line 172 of file classpnp.h.

#define CLASS_TAG_AUTORUN_DISABLE   'ALcS'

Definition at line 77 of file classpnp.h.

Referenced by ClasspIsMediaChangeDisabledDueToHardwareLimitation().

#define CLASS_TAG_DEVICE_CONTROL   'OIcS'

Definition at line 85 of file classpnp.h.

Referenced by ClassSendDeviceIoControlSynchronous().

#define CLASS_TAG_FAILURE_PREDICT   'fLcS'

Definition at line 84 of file classpnp.h.

Referenced by ClassSetFailurePredictionPoll().

#define CLASS_TAG_FILE_OBJECT_EXTENSION   'FLcS'

Definition at line 78 of file classpnp.h.

Referenced by ClasspCreateClose().

#define CLASS_TAG_MEDIA_CHANGE_DETECTION   'MLcS'

Definition at line 79 of file classpnp.h.

Referenced by ClasspInitializePolling().

#define CLASS_TAG_MODE_DATA   'oLcS'

Definition at line 86 of file classpnp.h.

#define CLASS_TAG_MOUNT   'mLcS'

Definition at line 80 of file classpnp.h.

#define CLASS_TAG_MULTIPATH   'mPcS'

Definition at line 87 of file classpnp.h.

#define CLASS_TAG_POWER   'WLcS'

Definition at line 82 of file classpnp.h.

#define CLASS_TAG_RELEASE_QUEUE   'qLcS'

Definition at line 81 of file classpnp.h.

Referenced by ClasspAllocateReleaseQueueIrp().

#define CLASS_TAG_WMI   'wLcS'

Definition at line 83 of file classpnp.h.

Referenced by ClassWmiFireEvent().

#define CLASS_WORKING_SET_MAXIMUM   2048

Definition at line 158 of file classpnp.h.

#define ClasspAllocateSrb (   ext)
Value:
ExAllocateFromNPagedLookasideList( \
&((ext)->CommonExtension.SrbLookasideList))
char ext[3]
Definition: mkdosfs.c:358

Definition at line 143 of file classpnp.h.

Referenced by ClassBuildRequest(), and ClasspEjectionControl().

#define ClasspFreeSrb (   ext,
  srb 
)
Value:
ExFreeToNPagedLookasideList( \
&((ext)->CommonExtension.SrbLookasideList), \
(srb))
char ext[3]
Definition: mkdosfs.c:358

Definition at line 147 of file classpnp.h.

Referenced by ClassFreeOrReuseSrb().

#define DEBUG_BUFFER_LENGTH   256

Definition at line 125 of file classpnp.h.

#define DebugPrint (   x)

Definition at line 122 of file classpnp.h.

#define DEFAULT_FAILURE_PREDICTION_PERIOD   60 * 60 * 1

Definition at line 186 of file classpnp.h.

Referenced by ClassSetFailurePredictionPoll().

#define DEV_NO_12BYTE_CDB   0x00000008

Definition at line 178 of file classpnp.h.

#define DEV_POWER_PROTECTED   0x00000010

Definition at line 179 of file classpnp.h.

#define DEV_SAFE_START_UNIT   0x00000004

Definition at line 177 of file classpnp.h.

#define DEV_USE_16BYTE_CDB   0x00000020

Definition at line 180 of file classpnp.h.

#define DEV_USE_SCSI1   0x00000002

Definition at line 176 of file classpnp.h.

#define DEV_WRITE_CACHE   0x00000001

Definition at line 175 of file classpnp.h.

#define DO_MCD (   fdoExtension)
Value:
(((fdoExtension)->MediaChangeDetectionInfo != NULL) && \
((fdoExtension)->MediaChangeDetectionInfo->MediaChangeDetectionDisableCount == 0))
smooth NULL
Definition: ftsmooth.c:513

Definition at line 35 of file classpnp.h.

#define FREE_POOL (   _PoolPtr)
Value:
if (_PoolPtr != NULL) { \
ExFreePool(_PoolPtr); \
_PoolPtr = NULL; \
}
smooth NULL
Definition: ftsmooth.c:513
#define ExFreePool(addr)
Definition: env_spec_w32.h:352

Definition at line 63 of file classpnp.h.

#define GUID_CLASSPNP_QUERY_REGINFOEX   {0x00e34b11, 0x2444, 0x4745, {0xa5, 0x3d, 0x62, 0x01, 0x00, 0xcd, 0x82, 0xf7}}

Definition at line 182 of file classpnp.h.

Referenced by DriverEntry().

#define GUID_CLASSPNP_SENSEINFO2   {0x509a8c5f, 0x71d7, 0x48f6, {0x82, 0x1e, 0x17, 0x3c, 0x49, 0xbf, 0x2f, 0x18}}

Definition at line 183 of file classpnp.h.

#define GUID_CLASSPNP_WORKING_SET   {0x105701b0, 0x9e9b, 0x47cb, {0x97, 0x80, 0x81, 0x19, 0x8a, 0xf7, 0xb5, 0x24}}

Definition at line 184 of file classpnp.h.

#define IS_CLEANUP_REQUEST (   majorFunction)
Value:
((majorFunction == IRP_MJ_CLOSE) || \
(majorFunction == IRP_MJ_CLEANUP) || \
(majorFunction == IRP_MJ_SHUTDOWN))
#define IRP_MJ_SHUTDOWN
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_CLEANUP

Definition at line 30 of file classpnp.h.

Referenced by ClassCreateClose().

#define IS_SCSIOP_READ (   opCode)
Value:
((opCode == SCSIOP_READ6) || \
(opCode == SCSIOP_READ) || \
(opCode == SCSIOP_READ12) || \
(opCode == SCSIOP_READ16))
#define SCSIOP_READ
Definition: cdrw_hw.h:905
#define SCSIOP_READ16
Definition: scsi.h:914
#define SCSIOP_READ6
Definition: cdrw_hw.h:874
#define SCSIOP_READ12
Definition: cdrw_hw.h:956

Definition at line 39 of file classpnp.h.

#define IS_SCSIOP_READWRITE (   opCode)    (IS_SCSIOP_READ(opCode) || IS_SCSIOP_WRITE(opCode))

Definition at line 51 of file classpnp.h.

#define IS_SCSIOP_WRITE (   opCode)
Value:
((opCode == SCSIOP_WRITE6) || \
(opCode == SCSIOP_WRITE) || \
(opCode == SCSIOP_WRITE12) || \
(opCode == SCSIOP_WRITE16))
#define SCSIOP_WRITE16
Definition: scsi.h:915
#define SCSIOP_WRITE12
Definition: cdrw_hw.h:957
#define SCSIOP_WRITE
Definition: cdrw_hw.h:906
#define SCSIOP_WRITE6
Definition: cdrw_hw.h:876

Definition at line 45 of file classpnp.h.

#define LEAVE   goto __tryLabel;

Definition at line 112 of file classpnp.h.

#define max (   a,
  b 
)    (((a) > (b)) ? (a) : (b))

Definition at line 16 of file classpnp.h.

#define MAXIMUM_RETRIES   4

Definition at line 89 of file classpnp.h.

#define MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS   (0x3b9aca00)

Definition at line 188 of file classpnp.h.

#define MEDIA_CHANGE_DEFAULT_TIME   1

Definition at line 129 of file classpnp.h.

#define MEDIA_CHANGE_TIMEOUT_TIME   300

Definition at line 130 of file classpnp.h.

Referenced by CdRomTickHandler(), and ClasspSendMediaStateIrp().

#define min (   a,
  b 
)    (((a) < (b)) ? (a) : (b))

Definition at line 17 of file classpnp.h.

#define REMOVE_COMPLETE   2
#define REMOVE_PENDING   1

Definition at line 94 of file classpnp.h.

Referenced by ClasspPrepareMcnIrp(), and ClassRemoveDevice().

#define SET_FLAG (   Flags,
  Bit 
)    ((Flags) |= (Bit))

Definition at line 154 of file classpnp.h.

Referenced by CdRomCreateDeviceObject(), CdRomDeviceControlDispatch(), CdRomDeviceControlDvdEndSession(), CdRomDeviceControlDvdReadStructure(), CdRomDeviceControlDvdSendKey(), CdRomDeviceControlDvdStartSessionReadKey(), CdRomInitDevice(), CdRomIsDeviceMmcDevice(), CdRomPrepareUpdateCapabilitiesIrp(), CdRomSetVolumeIntermediateCompletion(), CdRomStartIo(), CdRomSwitchModeCompletion(), CdRomUpdateCapacity(), CdRomUpdateGeometryCompletion(), ClassCreateDeviceObject(), ClassDeviceControl(), ClassDispatchPnp(), ClassInterpretSenseInfo(), ClassMinimalPowerHandler(), ClasspBuildRequestEx(), ClasspInitializePolling(), ClasspInterpretGesnData(), ClassPnpStartDevice(), ClasspPerfIncrementErrorCount(), ClasspPerfIncrementSuccessfulIo(), ClasspPowerHandler(), ClasspPowerUpCompletion(), ClasspPrepareMcnIrp(), ClasspScanForClassHacks(), ClasspScanForSpecialInRegistry(), ClassSendSrbAsynchronous(), ClassSendSrbSynchronous(), ClassStopUnitPowerHandler(), DisableWriteCache(), DiskCreateFdo(), DiskCreatePdo(), DiskDetermineMediaTypes(), DiskDeviceControl(), DiskFdoQueryWmiRegInfo(), DiskInfoExceptionCheck(), DiskInfoExceptionComplete(), DiskInitFdo(), DiskPerformSmartCommand(), DiskScanRegistryForSpecial(), DiskSetCacheInformation(), DiskSetSpecialHacks(), DiskStartFdo(), HitachiProcessError(), RetryRequest(), RetryTransferPacket(), ScanForSpecial(), SetupDriveCapacityTransferPacket(), SetupEjectionTransferPacket(), SetupModeSenseTransferPacket(), SetupReadWriteTransferPacket(), and ToshibaProcessError().

#define SRB_CLASS_FLAGS_FREE_MDL   0x80000000

Definition at line 22 of file classpnp.h.

#define SRB_CLASS_FLAGS_LOW_PRIORITY   0x10000000

Definition at line 19 of file classpnp.h.

Referenced by ClassDeviceControl(), ClassInterpretSenseInfo(), and ClasspInitializePolling().

#define SRB_CLASS_FLAGS_PAGING   0x40000000
#define SRB_CLASS_FLAGS_PERSISTANT   0x20000000

Definition at line 20 of file classpnp.h.

Referenced by ClassIoComplete().

#define START_UNIT_TIMEOUT   (60 * 4)

Definition at line 127 of file classpnp.h.

#define TEST_FLAG (   Flags,
  Bit 
)    (((Flags) & (Bit)) != 0)

Definition at line 156 of file classpnp.h.

Referenced by CdRomDeviceControlCompletion(), CdRomDeviceControlDispatch(), CdRomErrorHandler(), CdRomGetDeviceType(), CdRomInitDevice(), CdRomInterpretReadCapacity(), CdRomMmcErrorHandler(), CdRompGetConfiguration(), CdRomRemoveDevice(), CdRomSetVolumeIntermediateCompletion(), CdRomStartIo(), CdRomSwitchModeCompletion(), CdRomUpdateGeometryCompletion(), CdRomUpdateMmcDriveCapabilitiesCompletion(), ClassAsynchronousCompletion(), ClassClaimDevice(), ClassDispatchPnp(), ClassFreeOrReuseSrb(), ClassInterpretSenseInfo(), ClassIoComplete(), ClasspBuildRequestEx(), ClasspEjectionControl(), ClasspInitializeGesn(), ClasspInitializeHotplugInfo(), ClasspInterpretGesnData(), ClasspMediaChangeDetectionCompletion(), ClasspPerfIncrementSuccessfulIo(), ClasspPowerDownCompletion(), ClasspPowerHandler(), ClasspPowerUpCompletion(), ClasspReleaseQueue(), ClasspSendMediaStateIrp(), ClassReadDriveCapacity(), ClassReadWrite(), ClassSendSrbSynchronous(), ClassSpinDownPowerHandler(), DiskDetermineMediaTypes(), DiskDeviceControl(), DiskFdoProcessError(), DiskInfoExceptionComplete(), DiskInitFdo(), DiskIoctlGetDriveGeometryEx(), DiskQueryPnpCapabilities(), DiskScanRegistryForSpecial(), DiskSetCacheInformation(), DiskSetSpecialHacks(), DiskShutdownFlush(), DiskStartFdo(), FREE_PORT_ALLOCATED_SENSE_BUFFER(), HitachiProcessErrorGD2000(), InterpretTransferPacketError(), PORT_ALLOCATED_SENSE(), RetryPowerRequest(), RetryRequest(), ScanForSpecial(), SetupReadWriteTransferPacket(), and TransferPktComplete().

#define TRY

Definition at line 111 of file classpnp.h.

Typedef Documentation

Definition at line 262 of file classpnp.h.

typedef struct _CLASS_PRIVATE_COMMON_DATA CLASS_PRIVATE_COMMON_DATA

Definition at line 271 of file classpnp.h.

typedef struct _CLASS_PRIVATE_PDO_DATA CLASS_PRIVATE_PDO_DATA

Definition at line 268 of file classpnp.h.

Definition at line 262 of file classpnp.h.

typedef NTSTATUS(NTAPI * PCLASS_POWER_DEVICE)(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)

Definition at line 304 of file classpnp.h.

typedef struct _CLASS_PRIVATE_COMMON_DATA * PCLASS_PRIVATE_COMMON_DATA

Definition at line 271 of file classpnp.h.

Definition at line 265 of file classpnp.h.

typedef struct _CLASS_PRIVATE_PDO_DATA * PCLASS_PRIVATE_PDO_DATA

Definition at line 268 of file classpnp.h.

Enumeration Type Documentation

Enumerator
ClassDebugError 
ClassDebugWarning 
ClassDebugTrace 
ClassDebugInfo 
ClassDebugMediaLocks 
ClassDebugMCN 
ClassDebugDelayedRetry 
ClassDebugSenseInfo 
ClassDebugRemoveLock 
ClassDebugExternal4 
ClassDebugExternal3 
ClassDebugExternal2 
ClassDebugExternal1 

Definition at line 208 of file classpnp.h.

Enumerator
MediaUnknown 
MediaPresent 
MediaNotPresent 
MediaUnavailable 

Definition at line 201 of file classpnp.h.

201  {
202  MediaUnknown,
203  MediaPresent,
enum _MEDIA_CHANGE_DETECTION_STATE MEDIA_CHANGE_DETECTION_STATE
enum _MEDIA_CHANGE_DETECTION_STATE * PMEDIA_CHANGE_DETECTION_STATE
Enumerator
PowerDownDeviceInitial 
PowerDownDeviceLocked 
PowerDownDeviceStopped 
PowerDownDeviceOff 
PowerDownDeviceUnlocked 

Definition at line 236 of file classpnp.h.

Enumerator
PowerDownDeviceInitial2 
PowerDownDeviceLocked2 
PowerDownDeviceFlushed2 
PowerDownDeviceStopped2 
PowerDownDeviceOff2 
PowerDownDeviceUnlocked2 

Definition at line 244 of file classpnp.h.

Enumerator
PowerUpDeviceInitial 
PowerUpDeviceLocked 
PowerUpDeviceOn 
PowerUpDeviceStarted 
PowerUpDeviceUnlocked 

Definition at line 253 of file classpnp.h.

Enumerator
EventGeneration 
DataBlockCollection 

Definition at line 224 of file classpnp.h.

Enumerator
FailurePredictionNone 
FailurePredictionIoctl 
FailurePredictionSmart 
FailurePredictionSense 

Definition at line 229 of file classpnp.h.

Function Documentation

_In_ PIRP _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG _In_reads_ ( _Inexpressible_(max(InBufferSize, OutBufferSize))  )
_In_ PIRP _In_ ULONG _In_ ULONG _In_reads_bytes_ ( BufferSize  )
_In_ LPGUID _In_ ULONG _In_ ULONG _In_reads_bytes_ ( EventDataSize  )
_In_ PCHAR _In_ ULONG _In_reads_bytes_opt_ ( InquiryDataLength  )
_In_ const GUID _In_ ULONG _In_reads_bytes_opt_ ( ExtraDataSize  )
_IRQL_requires_ ( DISPATCH_LEVEL  )
_IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 30 of file rmap.c.

36 {
38 }
#define TAG_RMAP
Definition: tag.h:133
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1097
#define P(row, col)
Definition: m_matrix.c:147
_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
_In_ PIRP _In_ ULONG _In_ ULONG _Out_writes_bytes_ ( BufferAvail  )
C_ASSERT ( (MAXULONG-sizeof(SRB_HISTORY))/30000 >=sizeof(SRB_HISTORY_ITEM )
SCSIPORTAPI ULONG NTAPI ClassAcquireRemoveLockEx ( _In_ PDEVICE_OBJECT  DeviceObject,
PVOID  Tag,
_In_ PCSTR  File,
_In_ ULONG  Line 
)
SCSIPORTAPI NTSTATUS NTAPI ClassAsynchronousCompletion ( PDEVICE_OBJECT  DeviceObject,
PIRP  Irp,
PVOID  Event 
)

Definition at line 2168 of file class.c.

Referenced by ClassSendStartUnit(), HitachiProcessError(), and ResetBus().

2173 {
2175  PSCSI_REQUEST_BLOCK srb;
2176 
2177  if(DeviceObject == NULL) {
2178 
2179  DeviceObject = context->DeviceObject;
2180  }
2181 
2182  srb = &context->Srb;
2183 
2184  //
2185  // If this is an execute srb, then check the return status and make sure.
2186  // the queue is not frozen.
2187  //
2188 
2189  if (srb->Function == SRB_FUNCTION_EXECUTE_SCSI) {
2190 
2191  //
2192  // Check for a frozen queue.
2193  //
2194 
2195  if (srb->SrbStatus & SRB_STATUS_QUEUE_FROZEN) {
2196 
2197  //
2198  // Unfreeze the queue getting the device object from the context.
2199  //
2200 
2201  ClassReleaseQueue(context->DeviceObject);
2202  }
2203  }
2204 
2205  { // free port-allocated sense buffer if we can detect
2206 
2207  if (((PCOMMON_DEVICE_EXTENSION)(DeviceObject->DeviceExtension))->IsFdo) {
2208 
2209  PFUNCTIONAL_DEVICE_EXTENSION fdoExtension = DeviceObject->DeviceExtension;
2210  if (PORT_ALLOCATED_SENSE(fdoExtension, srb)) {
2211  FREE_PORT_ALLOCATED_SENSE_BUFFER(fdoExtension, srb);
2212  }
2213 
2214  } else {
2215 
2217 
2218  }
2219  }
2220 
2221 
2222  //
2223  // Free the context and the Irp.
2224  //
2225 
2226  if (Irp->MdlAddress != NULL) {
2227  MmUnlockPages(Irp->MdlAddress);
2228  IoFreeMdl(Irp->MdlAddress);
2229 
2230  Irp->MdlAddress = NULL;
2231  }
2232 
2233  ClassReleaseRemoveLock(DeviceObject, Irp);
2234 
2235  ExFreePool(context);
2236  IoFreeIrp(Irp);
2237 
2238  //
2239  // Indicate the I/O system should stop processing the Irp completion.
2240  //
2241 
2243 
2244 } // end ClassAsynchronousCompletion()
VOID NTAPI ClassReleaseQueue(IN PDEVICE_OBJECT Fdo)
Definition: class.c:8160
ULONG SrbFlags
Definition: srb.h:252
Definition: http.c:6303
#define TEST_FLAG(Flags, Bit)
Definition: classpnp.h:156
#define SRB_FLAGS_FREE_SENSE_BUFFER
Definition: srb.h:398
_In_ PIRP Irp
Definition: csq.h:116
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
VOID NTAPI MmUnlockPages(IN PMDL Mdl)
Definition: mdlsup.c:1409
UCHAR SrbStatus
Definition: srb.h:243
PDEVICE_OBJECT DeviceObject
Definition: class2.h:140
SCSI_REQUEST_BLOCK Srb
Definition: class2.h:141
PVOID DeviceExtension
Definition: env_spec_w32.h:418
smooth NULL
Definition: ftsmooth.c:513
static __inline BOOLEAN PORT_ALLOCATED_SENSE(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: classpnp.h:1244
#define STATUS_MORE_PROCESSING_REQUIRED
Definition: udferr_usr.h:144
UCHAR Function
Definition: srb.h:242
static __inline VOID FREE_PORT_ALLOCATED_SENSE_BUFFER(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: classpnp.h:1255
VOID NTAPI IoFreeMdl(PMDL Mdl)
Definition: iomdl.c:146
#define SRB_STATUS_QUEUE_FROZEN
Definition: srb.h:378
VOID NTAPI IoFreeIrp(IN PIRP Irp)
Definition: irp.c:1589
#define SRB_FUNCTION_EXECUTE_SCSI
Definition: srb.h:307
struct tagContext Context
Definition: acpixf.h:1013
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
VOID NTAPI ClassReleaseRemoveLock(IN PDEVICE_OBJECT DeviceObject, IN OPTIONAL PIRP Tag)
Definition: lock.c:212
SCSIPORTAPI NTSTATUS NTAPI ClassBuildRequest ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp 
)
SCSIPORTAPI VOID NTAPI ClassCheckMediaState ( _In_ PFUNCTIONAL_DEVICE_EXTENSION  FdoExtension)
SCSIPORTAPI NTSTATUS NTAPI ClassCheckVerifyComplete ( PDEVICE_OBJECT  DeviceObject,
PIRP  Irp,
PVOID  Context 
)
SCSIPORTAPI VOID NTAPI ClassCompleteRequest ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp,
_In_ CCHAR  PriorityBoost 
)
SCSIPORTAPI VOID ClassDebugPrint ( _In_ CLASS_DEBUG_LEVEL  DebugPrintLevel,
_In_z_ PCCHAR  DebugMessage,
  ... 
)
SCSIPORTAPI NTSTATUS NTAPI ClassDeviceControl ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PIRP  Irp 
)
SCSIPORTAPI PVOID NTAPI ClassFindModePage ( _In_reads_bytes_(Length) PCHAR  ModeSenseBuffer,
_In_ ULONG  Length,
_In_ UCHAR  PageMode,
_In_ BOOLEAN  Use6Byte 
)
SCSIPORTAPI NTSTATUS NTAPI ClassForwardIrpSynchronous ( _In_ PCOMMON_DEVICE_EXTENSION  CommonExtension,
_In_ PIRP  Irp 
)
SCSIPORTAPI PVPB NTAPI ClassGetVpb ( _In_ PDEVICE_OBJECT  DeviceObject)
SCSIPORTAPI NTSTATUS NTAPI ClassInternalIoControl ( PDEVICE_OBJECT  DeviceObject,
PIRP  Irp 
)
SCSIPORTAPI BOOLEAN NTAPI ClassInterpretSenseInfo ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PSCSI_REQUEST_BLOCK  Srb,
_In_ UCHAR  MajorFunctionCode,
_In_ ULONG  IoDeviceCode,
_In_ ULONG  RetryCount,
_Out_ NTSTATUS Status,
_Out_opt_ _Deref_out_range_(0, 100) ULONG RetryInterval 
)
SCSIPORTAPI NTSTATUS NTAPI ClassIoComplete ( PDEVICE_OBJECT  DeviceObject,
PIRP  Irp,
PVOID  Context 
)
SCSIPORTAPI NTSTATUS NTAPI ClassIoCompleteAssociated ( PDEVICE_OBJECT  DeviceObject,
PIRP  Irp,
PVOID  Context 
)
SCSIPORTAPI ULONG NTAPI ClassModeSense ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_reads_bytes_(Length) PCHAR  ModeSenseBuffer,
_In_ ULONG  Length,
_In_ UCHAR  PageMode 
)
_Must_inspect_result_ SCSIPORTAPI NTSTATUS NTAPI ClassReadDriveCapacity ( _In_ PDEVICE_OBJECT  DeviceObject)
SCSIPORTAPI VOID NTAPI ClassReleaseChildLock ( _In_ PFUNCTIONAL_DEVICE_EXTENSION  FdoExtension)
SCSIPORTAPI VOID NTAPI ClassReleaseQueue ( _In_ PDEVICE_OBJECT  DeviceObject)
SCSIPORTAPI VOID NTAPI ClassReleaseRemoveLock ( _In_ PDEVICE_OBJECT  DeviceObject,
PIRP  Tag 
)
SCSIPORTAPI VOID NTAPI ClassResetMediaChangeTimer ( _In_ PFUNCTIONAL_DEVICE_EXTENSION  FdoExtension)
VOID NTAPI ClassSendDeviceIoControlSynchronous ( _In_ ULONG  IoControlCode,
_In_ PDEVICE_OBJECT  TargetDeviceObject,
_Inout_updates_opt_(_Inexpressible_(max(InputBufferLength, OutputBufferLength))) PVOID  Buffer,
_In_ ULONG  InputBufferLength,
_In_ ULONG  OutputBufferLength,
_In_ BOOLEAN  InternalDeviceIoControl,
_Out_ PIO_STATUS_BLOCK  IoStatus 
)
SCSIPORTAPI NTSTATUS NTAPI ClassSendIrpSynchronous ( _In_ PDEVICE_OBJECT  TargetDeviceObject,
_In_ PIRP  Irp 
)
SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbAsynchronous ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PSCSI_REQUEST_BLOCK  Srb,
_In_ PIRP  Irp,
_In_reads_bytes_opt_(BufferLength) __drv_aliasesMem PVOID  BufferAddress,
_In_ ULONG  BufferLength,
_In_ BOOLEAN  WriteToDevice 
)
SCSIPORTAPI NTSTATUS NTAPI ClassSendSrbSynchronous ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PSCSI_REQUEST_BLOCK  Srb,
_In_reads_bytes_opt_(BufferLength) PVOID  BufferAddress,
_In_ ULONG  BufferLength,
_In_ BOOLEAN  WriteToDevice 
)
VOID NTAPI ClassSendStartUnit ( _In_ PDEVICE_OBJECT  DeviceObject)
SCSIPORTAPI NTSTATUS NTAPI ClassSpinDownPowerHandler ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp 
)
SCSIPORTAPI VOID NTAPI ClassSplitRequest ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp,
_In_ ULONG  MaximumBytes 
)
NTSTATUS NTAPI ClassStopUnitPowerHandler ( _In_ PDEVICE_OBJECT  DeviceObject,
_In_ PIRP  Irp 
)
SCSIPORTAPI NTSTATUS NTAPI ClassWmiCompleteRequest ( _In_ PDEVICE_OBJECT  DeviceObject,
_Inout_ PIRP  Irp,
_In_ NTSTATUS  Status,
_In_ ULONG  BufferUsed,
_In_ CCHAR  PriorityBoost 
)
static ULONG CountOfSetBitsUChar ( UCHAR  _X)
inlinestatic

Definition at line 190 of file classpnp.h.

191 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1
static ULONG CountOfSetBitsULong ( ULONG  _X)
inlinestatic

Definition at line 192 of file classpnp.h.

193 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1
static ULONG CountOfSetBitsULong32 ( ULONG32  _X)
inlinestatic

Definition at line 194 of file classpnp.h.

195 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1
static ULONG CountOfSetBitsULong64 ( ULONG64  _X)
inlinestatic

Definition at line 196 of file classpnp.h.

197 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1
static ULONG CountOfSetBitsUlongPtr ( ULONG_PTR  _X)
inlinestatic

Definition at line 198 of file classpnp.h.

199 { ULONG i = 0; while (_X) { _X &= _X - 1; i++; } return i; }
GLenum GLclampf GLint i
Definition: glfuncs.h:14
#define _X(x)
Definition: CString.cpp:210
unsigned int ULONG
Definition: retypes.h:1
static __inline VOID FREE_PORT_ALLOCATED_SENSE_BUFFER ( _In_ PFUNCTIONAL_DEVICE_EXTENSION  FdoExtension,
_In_ PSCSI_REQUEST_BLOCK  Srb 
)
static

Definition at line 1255 of file classpnp.h.

Referenced by ClassAsynchronousCompletion(), ClassIoComplete(), ClassIoCompleteAssociated(), ClasspMediaChangeDetectionCompletion(), ClassSendSrbAsynchronous(), ClassSendSrbSynchronous(), and TransferPktComplete().

1258 {
1261  ASSERT(Srb->SenseInfoBuffer != FdoExtension->SenseData);
1262 
1263  ExFreePool(Srb->SenseInfoBuffer);
1264  Srb->SenseInfoBuffer = FdoExtension->SenseData;
1265  Srb->SenseInfoBufferLength = SENSE_BUFFER_SIZE;
1267  return;
1268 }
#define TEST_FLAG(Flags, Bit)
Definition: classpnp.h:156
#define SRB_FLAGS_FREE_SENSE_BUFFER
Definition: srb.h:398
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
#define SENSE_BUFFER_SIZE
Definition: cdrw_hw.h:1183
#define CLEAR_FLAG(Flags, Bit)
Definition: classpnp.h:155
#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE
Definition: srb.h:405
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
static __inline BOOLEAN PORT_ALLOCATED_SENSE ( _In_ PFUNCTIONAL_DEVICE_EXTENSION  FdoExtension,
_In_ PSCSI_REQUEST_BLOCK  Srb 
)
static

Definition at line 1244 of file classpnp.h.

Referenced by ClassAsynchronousCompletion(), ClassIoComplete(), ClassIoCompleteAssociated(), ClasspMediaChangeDetectionCompletion(), ClassSendSrbAsynchronous(), ClassSendSrbSynchronous(), and TransferPktComplete().

1247 {
1248  return ((BOOLEAN)((TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_PORT_DRIVER_ALLOCSENSE) &&
1249  TEST_FLAG(Srb->SrbFlags, SRB_FLAGS_FREE_SENSE_BUFFER)) &&
1250  (Srb->SenseInfoBuffer != FdoExtension->SenseData)));
1251 }
#define TEST_FLAG(Flags, Bit)
Definition: classpnp.h:156
#define SRB_FLAGS_FREE_SENSE_BUFFER
Definition: srb.h:398
unsigned char BOOLEAN
#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE
Definition: srb.h:405
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49

Variable Documentation

_In_ BOOLEAN AcquireChildLock

Definition at line 989 of file classpnp.h.

_In_ BOOLEAN AllowDriveToSleep

Definition at line 1082 of file classpnp.h.

_In_ PVOID Argument2

Definition at line 680 of file classpnp.h.

Referenced by ClassInitialize(), DebugService(), and ScsiClassInitialize().

Definition at line 401 of file classpnp.h.

Definition at line 410 of file classpnp.h.

_In_ PDEVICE_CAPABILITIES Capabilities

Definition at line 375 of file classpnp.h.

IO_COMPLETION_ROUTINE ClassSignalCompletion

Definition at line 1137 of file classpnp.h.

Referenced by ClasspCreateClose(), and ClasspInitializeGesn().

Definition at line 778 of file classpnp.h.

Definition at line 419 of file classpnp.h.

Definition at line 966 of file classpnp.h.

Referenced by AddResourceItems(), CUSBRequest::AllocateEndpointDescriptor(), CUSBHardwareDevice::AllocateEndpointDescriptor(), BlMmMapPhysicalAddressEx(), BuildUSBAudioFilterTopology(), CloseStreamRoutine(), CountTerminalUnits(), CountTopologyComponents(), CUSBRequest::CreateDescriptor(), CUSBRequest::CreateGeneralTransferDescriptor(), CUSBRequest::CreateIsochronousTransferDescriptor(), DECLARE_INTERFACE_(), DosCheckInput(), DosCloseHandle(), DosCopyHandleTable(), DosCreateFile(), DosCreateFileEx(), DosDeviceIoControl(), DosFlushFileBuffers(), DosForceDuplicateHandle(), DosInt21h(), DosLockFile(), DosOpenFile(), DosOpenHandle(), DosReadCharacter(), DosReadFile(), DosReadLineBuffered(), DosSeekFile(), DosUnlockFile(), DosWriteFile(), DumpFullConfigurationDescriptor(), CUSBRequest::DumpQueueHead(), FindNodeContextWithId(), HalInitializeBios(), HalpAssignPCISlotResources(), HalpQueryResources(), HDA_FDOStartDevice(), CUSBHardwareDevice::InitializeController(), InitializePool(), IntVideoPortPnPStartDevice(), CUSBQueue::IsQueueHeadComplete(), CUSBQueue::IsTransferDescriptorInEndpoint(), CUSBQueue::IsTransferDescriptorInIsoEndpoint(), KdpGetMemorySizeInMBs(), KsAddDevice(), KsCreateDevice(), KsDispatchSetSecurity(), KsFilterFactoryUpdateCacheData(), KsInitializeDevice(), KsInitializeDriver(), KspPinPropertyHandler(), KspValidateConnectRequest(), MiBuildPfnDatabase(), MiniportHandleInterrupt(), MiQueryResources(), MiScanMemoryDescriptors(), MmArchTranslateVirtualAddress(), MmFwGetMemoryMap(), MmMdCopyList(), MmMdFreeGlobalDescriptors(), MmMdRemoveRegionFromMdlEx(), MmMdTruncateDescriptors(), MmPaInitialize(), MmPapAllocatePagesInRange(), MmPapAllocatePhysicalPagesInRange(), MmPapFreePhysicalPages(), MmPapPageAllocatorExtend(), MmPaReleaseSelfMapPages(), MmPaReserveSelfMapPages(), MmTrInitialize(), Mmx86pMapMemoryRegions(), PcCreateSubdeviceDescriptor(), PciAcpiFindRsdt(), PciAddDevice(), PciDebugPrintIoResReqList(), PciGetIrqRoutingTableFromRegistry(), PciIdeXPdoQueryResourceRequirements(), PdoQueryResourceRequirements(), PdoQueryResources(), PinPropertyHandler(), PinWaveCyclicAddEndOfStreamEvent(), PinWaveCyclicAddLoopedStreamEvent(), PinWaveCyclicAllocatorFraming(), PinWaveCyclicAudioPosition(), PinWaveCyclicDataFormat(), PinWaveCyclicState(), PinWavePciAllocatorFraming(), PinWavePciAudioPosition(), PinWavePciDataFormat(), PinWavePciState(), PropertyItemDispatch(), PspQueryDescriptorThread(), SepGetDaclFromDescriptor(), SepGetGroupFromDescriptor(), SepGetOwnerFromDescriptor(), SepGetSaclFromDescriptor(), SmpCreateEmergencyPagingFile(), SmpCreatePagingFileDescriptor(), SmpCreatePagingFiles(), StreamClassStartDevice(), TopologyPropertyHandler(), TrpGenerateMappingTracker(), UsbAudioGetDataRanges(), USBAudioGetDescriptor(), UsbAudioGetNonStreamingTerminalDescriptorByIndex(), UsbAudioGetStreamingTerminalDescriptorByIndex(), USBCCGP_CountAssociationDescriptors(), USBCCGP_GetAssociationDescriptorAtIndex(), USBCCGP_GetDescriptor(), USBCCGP_InitFunctionDescriptor(), USBCCGP_InitInterfaceListOfFunctionDescriptor(), USBH_CheckDeviceLanguage(), USBH_GetSerialNumberString(), USBH_PdoQueryDeviceText(), USBH_SyncGetStringDescriptor(), USBHUB_DumpingConfiguration(), USBPORT_DumpingConfiguration(), USBPORT_GetInterfaceLength(), USBPORT_InitInterfaceInfo(), USBPORT_OpenInterface(), USBPORT_ParseConfigurationDescriptor(), USBPORT_RootHubStandardCommand(), USBSTOR_GetDescriptor(), USBSTOR_IsFloppy(), VideoPortGetAccessRanges(), and XIPpFindMemoryDescriptor().

Definition at line 1281 of file classpnp.h.

_In_ PCHAR DeviceName

Definition at line 1036 of file classpnp.h.

_In_ LPGUID _In_ ULONG _In_ ULONG EventDataSize

Definition at line 1057 of file classpnp.h.

Referenced by ClassWmiFireEvent().

_In_ PUCHAR EventPrefix

Definition at line 1074 of file classpnp.h.

_In_ const GUID _In_ ULONG ExtraDataSize

Definition at line 1236 of file classpnp.h.

_In_ FAILURE_PREDICTION_METHOD FailurePredictionMethod

Definition at line 1108 of file classpnp.h.

Referenced by ClassSetFailurePredictionPoll().

Definition at line 1229 of file classpnp.h.

Referenced by _MiSimpleWrite(), acquire_for_lazy_write(), AfdAccept(), AfdBindSocket(), AfdCancelHandler(), AfdCleanupSocket(), AfdCloseSocket(), AfdConnectedSocketReadData(), AfdConnectedSocketWriteData(), AfdCreateSocket(), AfdDisconnect(), AfdDispatch(), AfdEnumEvents(), AfdEventSelect(), AfdGetConnectData(), AfdGetConnectOptions(), AfdGetContext(), AfdGetContextSize(), AfdGetDisconnectData(), AfdGetDisconnectOptions(), AfdGetInfo(), AfdGetPeerName(), AfdGetSockName(), AfdGetTdiHandles(), AfdListenSocket(), AfdPacketSocketReadData(), AfdPacketSocketWriteData(), AfdSelect(), AfdSetConnectData(), AfdSetConnectDataSize(), AfdSetConnectOptions(), AfdSetConnectOptionsSize(), AfdSetContext(), AfdSetDisconnectData(), AfdSetDisconnectDataSize(), AfdSetDisconnectOptions(), AfdSetDisconnectOptionsSize(), AfdSetInfo(), AfdStreamSocketConnect(), AfdWaitForListen(), AudioPositionPropertyHandler(), BasicBehaviorChecks(), BroadcastOpen(), CcInitializeCacheMap(), CcRosInitializeFileCache(), CcScheduleReadAhead(), CdCommonCleanup(), CdCommonClose(), CdCommonCreate(), CdCompleteMdl(), CdDeleteInternalStream(), CdfsAttachFCBToFileObject(), CdfsCleanup(), CdfsClose(), CdfsCreateFile(), CdFsdDispatch(), CdfsDeviceControl(), CdfsFCBInitializeCache(), CdfsNotifyChangeDirectory(), CdfsQueryDirectory(), CdfsQueryInformation(), CdfsRead(), CdfsSetInformation(), CdLockVolumeInternal(), CdProcessException(), CdUnlockVolumeInternal(), CdVerifyFcbOperation(), CompBattAddNewBattery(), Control(), CreateMixerPinAndSetFormat(), CreateRedirectedFile(), delete_reparse_point(), disk_arrival(), DispCancelListenRequest(), DispCancelRequest(), DispTdiAssociateAddress(), do_read(), do_read_job(), drv_cleanup(), drv_flush_buffers(), drv_query_ea(), drv_query_security(), drv_read(), drv_set_ea(), drv_set_security(), drv_write(), ExeFmtpCreateImageSection(), ExeFmtpReadFile(), Ext2AllocateIrpContext(), Ext2Cleanup(), Ext2Close(), Ext2FloppyFlush(), Ext2Flush(), Ext2GetRetrievalPointerBase(), Ext2GetRetrievalPointers(), Ext2InvalidateVolumes(), Ext2LockControl(), Ext2LockVcb(), Ext2NotifyChangeDirectory(), Ext2OplockRequest(), Ext2QueryDirectory(), Ext2QueryFileInformation(), Ext2QueryRetrievalPointers(), Ext2Read(), Ext2ReadComplete(), Ext2ReadFile(), Ext2ReadVolume(), Ext2SetFileInformation(), Ext2SetLinkInfo(), Ext2SetRenameInfo(), Ext2StartFloppyFlushDpc(), Ext2Write(), Ext2WriteComplete(), Ext2WriteFile(), Ext2WriteVolume(), FatFileSystemControl(), FatiCleanup(), FatiCreate(), FatiQueryInformation(), FatiQueryVolumeInfo(), FatiRead(), FatiSetInformation(), FatQueryInformation(), FatQueryVolumeInfo(), FatRead(), FatSetInformation(), FFSCleanup(), FFSClose(), FFSExceptionHandler(), FFSFloppyFlush(), FFSFlush(), FFSInvalidateVolumes(), FFSLockControl(), FFSLockVcb(), FFSNotifyChangeDirectory(), FFSQueryDirectory(), FFSQueryInformation(), FFSRead(), FFSReadComplete(), FFSReadFile(), FFSReadVolume(), FFSSetInformation(), FFSSetRenameInfo(), FFSStartFloppyFlushDpc(), FFSUnpinRepinnedBcbs(), FFSWrite(), FFSWriteComplete(), FFSWriteFile(), FFSWriteVolume(), find_device_from_uuid(), finish_removing_device(), FsdClose(), FsdCreate(), FsdRead(), FsRtlCompleteLockIrpReal(), FsRtlFastUnlockSingle(), FsRtlGetFileSize(), FsRtlPrivateLock(), FsRtlProcessFileLock(), IKsPin_PinMasterClock(), IoAttachDevice(), IoCancelFileOpen(), IoCreateStreamFileObjectEx(), IoCreateStreamFileObjectLite(), IofCompleteRequest(), IoGetBootDiskInformation(), IoPageRead(), IopCloseFile(), IopCompleteRequest(), IopCreateArcNamesCd(), IopCreateArcNamesDisk(), IopDeleteFile(), IopDeviceFsIoControl(), IopGetFileInformation(), IopGetRelatedTargetDevice(), IopGetSetSecurityObject(), IopMarkBootPartition(), IopParseDevice(), IopQueryDeviceInformation(), IopQueryNameFile(), IoSetInformation(), IoSynchronousPageWrite(), IoVolumeDeviceToDosName(), IsFtVolume(), IssueUniqueIdChangeNotify(), IssueUniqueIdChangeNotifyWorker(), KdbpCaptureFileForSymbols(), KdbpSymLoadModuleSymbols(), KsFreeEventList(), KsSetInformationFile(), KsStreamIo(), KsSynchronousIoControlDevice(), LanCloseProtocol(), LanCreateProtocol(), LanDispatch(), LanReadData(), LanSetBufferedMode(), load_chunk_root(), LockOrUnlockVolume(), main(), MiFreeSegmentPage(), MiGetFileObjectForVad(), MiReadFilePage(), MiReadPage(), MiSimpleRead(), MmCreateArm3Section(), MmCreateCacheSection(), MmCreateDataFileSection(), MmCreateImageSection(), MmCreateSection(), MmFreeSectionPage(), MmGetFileNameForAddress(), MmGetFileNameForSection(), MmPageOutSectionView(), MmUnsharePageEntrySectionSegment(), MmWritePageSectionView(), MmWriteToSwapPage(), MountMgrCleanup(), MountMgrNotifyNameChange(), MountMgrVolumeMountPointChanged(), MsfsClose(), MsfsCreate(), MsfsCreateMailslot(), MsfsFileSystemControl(), MsfsQueryInformation(), MsfsRead(), MsfsSetInformation(), MsfsWrite(), MupBuildIoControlRequest(), MupCleanupVcb(), MupCreate(), notify_change_directory(), NpCommonFlushBuffers(), NpCreateCcb(), NpCreateExistingNamedPipe(), NpCreateNewNamedPipe(), NpFsdCreate(), NpFsdCreateNamedPipe(), NpSetConnectedPipeState(), NtCancelIoFile(), NtCreatePagingFile(), NtFlushBuffersFile(), NtfsAttachFCBToFileObject(), NtfsCleanup(), NtfsClose(), NtfsCreateFile(), NtfsFCBInitializeCache(), NtfsQueryDirectory(), NtfsQueryInformation(), NtfsRead(), NtLockFile(), NtNotifyChangeDirectoryFile(), NtQueryDirectoryFile(), NtQueryInformationFile(), NtQueryVolumeInformationFile(), NtReadFile(), NtSetInformationFile(), NtSetVolumeInformationFile(), NtUnlockFile(), NtWriteFile(), NullDispatch(), open_file(), OpenDevice(), OpenDeviceReadWrite(), Pin_fnDeviceIoControl(), Pin_fnWrite(), PopAddRemoveSysCapsCallback(), QueryDeviceInformation(), QuerySuggestedLinkName(), RawMountVolume(), ReconcileThisDatabaseWithMasterWorker(), RegisterForTargetDeviceNotification(), release_from_lazy_write(), RfsdCleanup(), RfsdClose(), RfsdExceptionHandler(), RfsdFloppyFlush(), RfsdFlush(), RfsdInvalidateVolumes(), RfsdLockControl(), RfsdLockVcb(), RfsdNotifyChangeDirectory(), RfsdQueryDirectory(), RfsdQueryInformation(), RfsdRead(), RfsdReadComplete(), RfsdReadFile(), RfsdReadVolume(), RfsdSetInformation(), RfsdSetRenameInfo(), RfsdStartFloppyFlushDpc(), RfsdUnpinRepinnedBcbs(), RfsdWrite(), RfsdWriteComplete(), RfsdWriteFile(), RfsdWriteVolume(), RxAdjustFileTimesAndSize(), RxCommonCleanup(), RxCommonClose(), RxCommonCreate(), RxCommonRead(), RxCommonWrite(), RxCompleteMdl(), RxCopyCreateParameters(), RxCreateFromNetRoot(), RxCreateTreeConnect(), RxLowIoWriteShellCompletion(), RxSetupNetFileObject(), RxVerifyOperationIsLegal(), SearchForLegacyDrivers(), SeLocateProcessImageName(), SendLinkCreated(), SendLinkDeleted(), SendOnlineNotification(), set_reparse_point(), TdiQueryDeviceControl(), test_vol(), TestIoCreateFile(), TestProviderInfo(), TestSharedCacheMap(), TestSymlinks(), UDFCleanup(), UDFCommonCleanup(), UDFCommonClose(), UDFCommonDeviceControl(), UDFCommonDirControl(), UDFCommonFileInfo(), UDFCommonFlush(), UDFCommonLockControl(), UDFCommonQueryVolInfo(), UDFCommonRead(), UDFCommonSetVolInfo(), UDFCommonWrite(), UDFExceptionHandler(), UDFMdlComplete(), VfatCleanupFile(), VfatCreateFile(), VfatDismountVolume(), VfatGetRetrievalPointers(), VfatLockOrUnlockVolume(), WdmAudControlDeviceState(), WdmAudFrameSize(), WdmAudOpenSysAudioDevices(), WdmAudReadWrite(), WdmAudResetStream(), write_file(), write_file2(), and xHalQueryDriveLayout().

_In_ CLASSPNP_SCAN_FOR_SPECIAL_INFO _In_ PCLASS_SCAN_FOR_SPECIAL_HANDLER Function

Definition at line 440 of file classpnp.h.

Definition at line 401 of file classpnp.h.

Definition at line 357 of file classpnp.h.

Definition at line 429 of file classpnp.h.

_In_ PVOID _In_ PCLASS_INIT_DATA InitializationData

Definition at line 680 of file classpnp.h.

Referenced by DriverEntry().

_In_ PCHAR _In_ ULONG _In_ ULONG InquiryDataLength

Definition at line 1039 of file classpnp.h.

Definition at line 1057 of file classpnp.h.

Definition at line 333 of file classpnp.h.

Definition at line 789 of file classpnp.h.

Referenced by ClassCreateDeviceObject().

_In_ ULONG _In_ BOOLEAN LogError

Definition at line 1117 of file classpnp.h.

_In_z_ PCCHAR _In_ PDEVICE_OBJECT LowerDeviceObject

Definition at line 789 of file classpnp.h.

Referenced by IoGetLowerDeviceObject(), and StreamClassAddDevice().

Definition at line 465 of file classpnp.h.

Referenced by ClassInterpretSenseInfo(), and ScsiClassInterpretSenseInfo().

Definition at line 429 of file classpnp.h.

Definition at line 386 of file classpnp.h.

_In_ ULONG NumberElements

Definition at line 944 of file classpnp.h.

_In_z_ PCCHAR ObjectNameBuffer

Definition at line 789 of file classpnp.h.

Referenced by WmipCaptureGuidObjectAttributes().

_In_opt_ PIRP OriginalRequest

Definition at line 465 of file classpnp.h.

Referenced by USBSTOR_SendRequest().

Definition at line 1117 of file classpnp.h.

Definition at line 1108 of file classpnp.h.

Definition at line 465 of file classpnp.h.

Definition at line 386 of file classpnp.h.

_In_ UCHAR RemoveType

Definition at line 1150 of file classpnp.h.

Definition at line 293 of file classpnp.h.

Definition at line 1180 of file classpnp.h.

_In_opt_ PWSTR SubkeyName

Definition at line 1209 of file classpnp.h.

Referenced by ClassGetDeviceParameter(), ClassSetDeviceParameter(), and EnumDeviceKeys().

Definition at line 317 of file classpnp.h.

_In_ ULONG _In_ BOOLEAN _In_ ULONG UniqueErrorValue

Definition at line 1117 of file classpnp.h.

Referenced by ClassNotifyFailurePredicted(), and TiWriteErrorLog().