8#define STREAMAPI __stdcall
9#define STREAM_SYSTEM_TIME_MASK ((STREAM_SYSTEM_TIME)0x00000001FFFFFFFF)
23#define DebugPrint(x) StreamClassDebugPrint x
24#define DEBUG_BREAKPOINT() DbgBreakPoint()
25#define DEBUG_ASSERT(exp) \
27 StreamClassDebugAssert( __FILE__, __LINE__, #exp, exp); \
32#define DEBUG_BREAKPOINT()
33#define DEBUG_ASSERT(exp)
81#define CLOCK_SUPPORT_CAN_SET_ONBOARD_CLOCK 0x1
82#define CLOCK_SUPPORT_CAN_READ_ONBOARD_CLOCK 0x2
83#define CLOCK_SUPPORT_CAN_RETURN_STREAM_TIME 0x4
169#define STREAM_REQUEST_BLOCK_SIZE sizeof(STREAM_REQUEST_BLOCK)
207#if (NTDDI_VERSION >= NTDDI_WINXP)
210#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
242#if (NTDDI_VERSION >= NTDDI_WINXP)
245#if ( (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_WS03) ) || (NTDDI_VERSION >= NTDDI_WS03SP1)
271#define SRB_HW_FLAGS_DATA_TRANSFER 0x01
272#define SRB_HW_FLAGS_STREAM_REQUEST 0x2
334#if (NTDDI_VERSION >= NTDDI_WINXP)
340#define STREAM_CLASS_VERSION_20 0x0200
343#if (NTDDI_VERSION >= NTDDI_WINXP)
369#if (NTDDI_VERSION >= NTDDI_WINXP)
418 _In_ PCCHAR DebugMessage,
470StreamClassQueryMasterClockSync(
498#define StreamClassRegisterMinidriver StreamClassRegisterAdapter
502StreamClassRegisterFilterWithNoKSPins(
_In_ PSCSI_REQUEST_BLOCK Srb
NTSTATUS STREAMAPI StreamClassRegisterAdapter(IN PVOID Argument1, IN PVOID Argument2, IN PHW_INITIALIZATION_DATA HwInitializationData)
BOOLEAN STREAMAPI StreamClassReadWriteConfig(IN PVOID HwDeviceExtension, IN BOOLEAN Read, IN PVOID Buffer, IN ULONG OffSet, IN ULONG Length)
#define _IRQL_requires_max_(irql)
_Must_inspect_result_ _In_ WDFDEVICE _In_ REFGUID EventGuid
enum _INTERFACE_TYPE INTERFACE_TYPE
struct _KSEVENT_ENTRY * PKSEVENT_ENTRY
#define _Inout_updates_bytes_(size)
#define _In_reads_opt_(size)
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _KINTERRUPT_MODE KINTERRUPT_MODE
#define __analysis_noreturn
enum _STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE * PSTREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE
struct _HW_STREAM_OBJECT * PHW_STREAM_OBJECT
enum _SRB_COMMAND SRB_COMMAND
VOID StreamClassAbortOutstandingRequests(_In_ PVOID HwDeviceExtension, _In_opt_ PHW_STREAM_OBJECT HwStreamObject, _In_ NTSTATUS Status)
struct _ACCESS_RANGE ACCESS_RANGE
@ SRB_PROPOSE_DATA_FORMAT
@ SRB_INDICATE_MASTER_CLOCK
@ SRB_SET_DEVICE_PROPERTY
@ SRB_INITIALIZATION_COMPLETE
@ SRB_OPEN_DEVICE_INSTANCE
@ SRB_GET_DATA_INTERSECTION
@ SRB_UNKNOWN_STREAM_COMMAND
@ SRB_GET_STREAM_PROPERTY
@ SRB_CLOSE_DEVICE_INSTANCE
@ SRB_SET_STREAM_PROPERTY
@ SRB_GET_DEVICE_PROPERTY
@ SRB_UNINITIALIZE_DEVICE
@ SRB_PROPOSE_STREAM_RATE
@ SRB_UNKNOWN_DEVICE_COMMAND
VOID(STREAMAPI * PHW_CANCEL_SRB)(IN PHW_STREAM_REQUEST_BLOCK SRB)
struct _HW_STREAM_REQUEST_BLOCK * PHW_STREAM_REQUEST_BLOCK
__GNU_EXTENSION typedef unsigned __int64 * PSTREAM_TIMESTAMP
struct _HW_STREAM_DESCRIPTOR HW_STREAM_DESCRIPTOR
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
VOID STREAMAPI StreamClassCallAtNewPriority(_In_opt_ PHW_STREAM_OBJECT StreamObject, _In_ PVOID HwDeviceExtension, _In_ STREAM_PRIORITY Priority, _In_ PHW_PRIORITY_ROUTINE PriorityRoutine, _In_ PVOID Context)
VOID(STREAMAPI * PHW_REQUEST_TIMEOUT_HANDLER)(IN PHW_STREAM_REQUEST_BLOCK SRB)
VOID(STREAMAPI * PHW_QUERY_CLOCK_ROUTINE)(IN PHW_TIME_CONTEXT TimeContext)
VOID STREAMAPI StreamClassReenumerateStreams(_In_ PVOID HwDeviceExtension, _In_ ULONG StreamDescriptorSize)
STREAM_PHYSICAL_ADDRESS STREAMAPI StreamClassGetPhysicalAddress(_In_ PVOID HwDeviceExtension, _In_opt_ PHW_STREAM_REQUEST_BLOCK HwSRB, _In_ PVOID VirtualAddress, _In_ STREAM_BUFFER_TYPE Type, _Out_ ULONG *Length)
enum _STREAM_PRIORITY STREAM_PRIORITY
struct _HW_INITIALIZATION_DATA * PHW_INITIALIZATION_DATA
enum _STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE * PSTREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE
struct _HW_STREAM_INFORMATION * PHW_STREAM_INFORMATION
BOOLEAN(STREAMAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
_In_ const GUID _In_ ULONG PinCount
PVOID STREAMAPI StreamClassGetDmaBuffer(_In_ PVOID HwDeviceExtension)
struct _STREAM_DATA_INTERSECT_INFO * PSTREAM_DATA_INTERSECT_INFO
NTSTATUS(STREAMAPI * PHW_EVENT_ROUTINE)(IN PHW_EVENT_DESCRIPTOR EventDescriptor)
enum _STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE
_In_ PVOID _In_ PHW_INITIALIZATION_DATA HwInitializationData
_STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE
@ SignalMultipleDeviceInstanceEvents
@ SignalMultipleDeviceEvents
@ ReadyForNextDeviceRequest
@ DeviceNotificationMaximum
VOID __cdecl StreamClassDebugPrint(_In_ STREAM_DEBUG_LEVEL DebugPrintLevel, _In_ PCCHAR DebugMessage,...)
struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
PKSEVENT_ENTRY StreamClassGetNextEvent(_In_opt_ PVOID HwInstanceExtension_OR_HwDeviceExtension, _In_opt_ PHW_STREAM_OBJECT HwStreamObject, _In_opt_ GUID *EventGuid, _In_ ULONG EventItem, _In_opt_ PKSEVENT_ENTRY CurrentEvent)
struct _HW_TIME_CONTEXT HW_TIME_CONTEXT
VOID(STREAMAPI * PHW_RECEIVE_STREAM_CONTROL_SRB)(IN struct _HW_STREAM_REQUEST_BLOCK *SRB)
struct _HW_TIME_CONTEXT * PHW_TIME_CONTEXT
struct _STREAM_METHOD_DESCRIPTOR * PSTREAM_METHOD_DESCRIPTOR
VOID(STREAMAPI * PHW_CLOCK_FUNCTION)(IN PHW_TIME_CONTEXT HwTimeContext)
__GNU_EXTENSION typedef unsigned __int64 STREAM_TIMESTAMP
struct _HW_EVENT_DESCRIPTOR HW_EVENT_DESCRIPTOR
__GNU_EXTENSION typedef unsigned __int64 * PSTREAM_SYSTEM_TIME
VOID(STREAMAPI * PHW_PRIORITY_ROUTINE)(IN PVOID Context)
VOID(STREAMAPI * PHW_RECEIVE_STREAM_DATA_SRB)(IN struct _HW_STREAM_REQUEST_BLOCK *SRB)
VOID STREAMAPI StreamClassCompleteRequestAndMarkQueueReady(_In_ PHW_STREAM_REQUEST_BLOCK Srb)
struct _HW_STREAM_HEADER HW_STREAM_HEADER
struct _STREAM_TIME_REFERENCE STREAM_TIME_REFERENCE
struct KSSCATTER_GATHER * PKSSCATTER_GATHER
@ TIME_READ_ONBOARD_CLOCK
struct _STREAM_TIME_REFERENCE * PSTREAM_TIME_REFERENCE
struct _STREAM_DATA_INTERSECT_INFO STREAM_DATA_INTERSECT_INFO
enum _STREAM_PRIORITY * PSTREAM_PRIORITY
struct _HW_STREAM_REQUEST_BLOCK HW_STREAM_REQUEST_BLOCK
struct _HW_STREAM_HEADER * PHW_STREAM_HEADER
__GNU_EXTENSION typedef unsigned __int64 STREAM_SYSTEM_TIME
struct _HW_CLOCK_OBJECT HW_CLOCK_OBJECT
struct _HW_STREAM_OBJECT HW_STREAM_OBJECT
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
BOOLEAN(STREAMAPI * PHW_RESET_ADAPTER)(IN PVOID DeviceExtension)
VOID __cdecl StreamClassStreamNotification(_In_ STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE NotificationType, _In_ PHW_STREAM_OBJECT StreamObject,...)
PHYSICAL_ADDRESS * PSTREAM_PHYSICAL_ADDRESS
struct _HW_STREAM_DESCRIPTOR * PHW_STREAM_DESCRIPTOR
_STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE
@ ReadyForNextStreamDataRequest
@ SignalMultipleStreamEvents
@ ReadyForNextStreamControlRequest
@ StreamNotificationMaximum
VOID STREAMAPI StreamClassScheduleTimer(_In_opt_ PHW_STREAM_OBJECT StreamObject, _In_ PVOID HwDeviceExtension, _In_ ULONG NumberOfMicroseconds, _In_ PHW_TIMER_ROUTINE TimerRoutine, _In_ PVOID Context)
VOID StreamClassQueryMasterClock(_In_ PHW_STREAM_OBJECT HwStreamObject, _In_ HANDLE MasterClockHandle, _In_ TIME_FUNCTION TimeFunction, _In_ PHW_QUERY_CLOCK_ROUTINE ClockCallbackRoutine)
VOID(STREAMAPI * PHW_TIMER_ROUTINE)(IN PVOID Context)
struct _HW_EVENT_DESCRIPTOR * PHW_EVENT_DESCRIPTOR
struct _HW_STREAM_INFORMATION HW_STREAM_INFORMATION
__analysis_noreturn VOID STREAMAPI StreamClassDebugAssert(_In_ PCHAR File, _In_ ULONG Line, _In_ PCHAR AssertText, _In_ ULONG AssertValue)
VOID(STREAMAPI * PHW_RECEIVE_DEVICE_SRB)(IN PHW_STREAM_REQUEST_BLOCK SRB)
VOID STREAMAPI StreamClassFilterReenumerateStreams(_In_ PVOID HwInstanceExtension, _In_ ULONG StreamDescriptorSize)
enum _STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE STREAM_MINIDRIVER_STREAM_NOTIFICATION_TYPE
struct _STREAM_PROPERTY_DESCRIPTOR * PSTREAM_PROPERTY_DESCRIPTOR
_Inout_ PHW_TIME_CONTEXT TimeContext
struct _HW_CLOCK_OBJECT * PHW_CLOCK_OBJECT
struct _ACCESS_RANGE * PACCESS_RANGE
VOID __cdecl StreamClassDeviceNotification(IN STREAM_MINIDRIVER_DEVICE_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension, IN PHW_STREAM_REQUEST_BLOCK pSrb, IN PKSEVENT_ENTRY EventEntry, IN GUID *EventSet, IN ULONG EventId)
struct _STREAM_PROPERTY_DESCRIPTOR STREAM_PROPERTY_DESCRIPTOR
struct _STREAM_METHOD_DESCRIPTOR STREAM_METHOD_DESCRIPTOR
PHYSICAL_ADDRESS STREAM_PHYSICAL_ADDRESS
PHYSICAL_ADDRESS PhysicalAddress
_Field_size_bytes_(RangeLength) STREAM_PHYSICAL_ADDRESS RangeStart
SCSI_PHYSICAL_ADDRESS RangeStart
PHW_CLOCK_FUNCTION HwClockFunction
struct _HW_DEVICE_EXTENSION * DeviceExtension
ULONG EnableEventSetIndex
struct _HW_STREAM_OBJECT * StreamObject
PKSEVENT_ENTRY EventEntry
PVOID HwInstanceExtension
ULONG PerStreamExtensionSize
_Field_size_(NumNameExtensions) PWCHAR *NameExtensionArray
PHW_INTERRUPT HwInterrupt
PHW_CANCEL_SRB HwCancelPacket
ULONG PerRequestExtensionSize
PHW_RECEIVE_DEVICE_SRB HwReceivePacket
ULONG FilterInstanceExtensionSize
BOOLEAN TurnOffSynchronization
PHW_REQUEST_TIMEOUT_HANDLER HwRequestTimeoutHandler
BOOLEAN Dma24BitAddresses
USHORT StreamClassVersion
ULONG HwInitializationDataSize
ULONG DeviceExtensionSize
HW_STREAM_HEADER StreamHeader
HW_STREAM_INFORMATION StreamInfo
PHW_EVENT_ROUTINE HwEventRoutine
PHW_RECEIVE_STREAM_CONTROL_SRB ReceiveControlPacket
HW_CLOCK_OBJECT HwClockObject
PHW_RECEIVE_STREAM_DATA_SRB ReceiveDataPacket
ULONG StreamHeaderMediaSpecific
ULONG StreamHeaderWorkspace
PHW_STREAM_OBJECT StreamObject
ULONG NumberOfBytesToTransfer
union _HW_STREAM_REQUEST_BLOCK::_CommandData CommandData
PVOID HwInstanceExtension
struct _HW_STREAM_REQUEST_BLOCK * NextSRB
ULONG NumberOfPhysicalPages
_Field_size_(NumberOfScatterGatherElements) PKSSCATTER_GATHER ScatterGatherBuffer
ULONG ActualBytesTransferred
ULONG NumberOfScatterGatherElements
struct _HW_DEVICE_EXTENSION * HwDeviceExtension
struct _HW_STREAM_OBJECT * HwStreamObject
_Field_size_bytes_(SizeOfDataFormatBuffer) PVOID DataFormatBuffer
ULONG SizeOfDataFormatBuffer
STREAM_TIMESTAMP CurrentOnboardClockValue
LARGE_INTEGER OnboardClockFrequency
LARGE_INTEGER CurrentSystemTime
DEVICE_POWER_STATE DeviceState
_Field_size_(_Inexpressible_(NumberOfBuffers)) PKSSTREAM_HEADER DataBufferArray
PHW_STREAM_DESCRIPTOR StreamBuffer
PSTREAM_DATA_INTERSECT_INFO IntersectInfo
PSTREAM_TIME_REFERENCE TimeReference
PSTREAM_PROPERTY_DESCRIPTOR PropertyInfo
struct _PORT_CONFIGURATION_INFORMATION * ConfigInfo
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
_Must_inspect_result_ _In_ WDFDEVICE _In_ CONST GUID * InterfaceClassGUID
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
_Reserved_ PVOID Reserved
_In_ PCEVENT_DESCRIPTOR EventDescriptor
_IRQL_requires_same_ _In_opt_ PVOID Argument1
_In_ PIO_TIMER_ROUTINE TimerRoutine