7#include "FxUsbPipeKm.tmh"
71 #pragma prefast(push);
90 __in size_t TotalBufferLength
142 "Could not allocate workitem: %!STATUS!",
status);
183 "Could not initialize ReadCompletedEvent: %!STATUS!",
223 "WDFUSBPIPE %p not the right type, %!STATUS!",
234 "WDFUSBPIPE %p, buffer size truncated, %!STATUS!",
246 "Pipe %p, sending __in transaction on a __out endpoint",
260 "Pipe %p, sending __out transaction on an __in endpoint",
270 "Pipe %p, Request %p, setting target failed, "
283 if (pContext ==
NULL) {
298 Request->EnableContextDisposeNotification();
MdDeviceObject __inline GetDeviceObject(VOID)
MdDeviceObject m_TargetDevice
virtual _Must_inspect_result_ NTSTATUS Initialize(__in size_t BufferSize, __in PWDF_OBJECT_ATTRIBUTES MemoryAttributes)=0
PVOID __inline GetObjectHandle(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
__inline MdIrp GetSubmitIrp(VOID)
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES RequestAttributes, __in_opt MdIrp Irp, __in_opt FxIoTarget *Target, __in FxRequestIrpOwnership Ownership, __in FxRequestConstructorCaller Caller, __deref_out FxRequest **Request)
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PVOID WdmObject, __out FxSystemWorkItem **pObject)
FX_URB_TYPE GetFxUrbTypeForRequest(__in FxRequestBase *Request)
UCHAR GetConfiguredSettingIndex(VOID)
FxUsbDevice * m_UsbDevice
BOOLEAN IsType(__in WDF_USB_PIPE_TYPE Type)
static WDF_USB_PIPE_TYPE _UsbdPipeTypeToWdf(__in USBD_PIPE_TYPE UsbdPipeType)
WDF_USB_PIPE_TYPE GetType(VOID)
BOOLEAN m_CheckPacketSize
_Must_inspect_result_ NTSTATUS FormatTransferRequest(__in FxRequestBase *Request, __in FxRequestBuffer *Buffer, __in ULONG TransferFlags=0)
USBD_PIPE_INFORMATION m_PipeInformation
VOID GetInformation(__out PWDF_USB_PIPE_INFORMATION PipeInformation)
FxUsbInterface * m_UsbInterface
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in EVENT_TYPE Type, __in BOOLEAN InitialState)
#define NT_SUCCESS(StatCode)
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
#define __drv_requiresIRQL(irql)
#define __drv_maxIRQL(irql)
#define __drv_functionClass(x)
#define __drv_minIRQL(irql)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS pFxDriverGlobals
@ FxRequestConstructorCallerIsFx
enum _FX_URB_TYPE FX_URB_TYPE
return pUsbPipe IsOutEndpoint()
return pUsbPipe IsInEndpoint()
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define _Must_inspect_result_
#define UNREFERENCED_PARAMETER(P)
#define STATUS_INVALID_BUFFER_SIZE
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
virtual VOID StoreAndReferenceMemory(__in FxRequestBuffer *Buffer)
FxUsbPipeRepeatReader m_Readers[1]
FxLookasideList * m_Lookaside
_Must_inspect_result_ NTSTATUS FormatRepeater(__in FxUsbPipeRepeatReader *Repeater)
static MdDeferredRoutineType _FxUsbPipeContinuousReadDpc
FxSystemWorkItem * m_WorkItem
WDFMEMORY_OFFSET m_Offsets
_Must_inspect_result_ NTSTATUS Config(__in PWDF_USB_CONTINUOUS_READER_CONFIG Config, __in size_t TotalBufferLength)
MxEvent ReadCompletedEvent
FxUsbPipeContinuousReader * Parent
_URB_BULK_OR_INTERRUPT_TRANSFER m_UrbLegacy
_URB_BULK_OR_INTERRUPT_TRANSFER * m_Urb
virtual VOID StoreAndReferenceMemory(__in FxRequestBuffer *Buffer)
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
VOID SetUrbInfo(__in USBD_PIPE_HANDLE PipeHandle, __in ULONG TransferFlags)
ULONG TransferBufferLength
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INSUFFICIENT_RESOURCES
#define USBD_TRANSFER_DIRECTION_IN
#define URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER
VOID FxFormatUsbRequest(__in FxRequestBase *Request, __in PURB Urb, __in FX_URB_TYPE FxUrbType, __drv_when(FxUrbType==FxUrbTypeUsbdAllocated, __in) __drv_when(FxUrbType !=FxUrbTypeUsbdAllocated, __in_opt) USBD_HANDLE UsbdHandle)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
FORCEINLINE VOID WDF_OBJECT_ATTRIBUTES_INIT(_Out_ PWDF_OBJECT_ATTRIBUTES Attributes)
#define WDF_NO_OBJECT_ATTRIBUTES
@ WdfUsbPipeTypeInterrupt
_In_ WDFUSBPIPE _Out_ PWDF_USB_PIPE_INFORMATION PipeInformation
enum _WDF_USB_PIPE_TYPE WDF_USB_PIPE_TYPE
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
_In_opt_ PVOID DeferredContext
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2