29#if defined(EVENT_TRACING)
30#include "FxUsbDevice.tmh"
33#define RtlSizeTToULong RtlULongPtrToULong
36#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
37#define UCHAR_MAX (0xff)
108#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
111#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
132#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
282#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
288#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
328 if (pDescriptor ==
NULL) {
401#if (FX_CORE_MODE == FX_CORE_USER_MODE)
414#if ((FX_CORE_MODE)==(FX_CORE_KERNEL_MODE))
423#if (FX_CORE_MODE == FX_CORE_USER_MODE)
425 IWudfDeviceStack* devstack =
NULL;
428 devstack =
device->GetDeviceStackInterface();
602#define STOP_TAG (PVOID) 'pots'
611 ULONG iPipe, iInterface;
628 AcquireInterfaceIterationLock();
693 ReleaseInterfaceIterationLock();
704 ULONG iPipe, iInterface;
721 AcquireInterfaceIterationLock();
791 ReleaseInterfaceIterationLock();
824 ULONG iPipe, intfIndex;
831 AcquireInterfaceIterationLock();
897 ReleaseInterfaceIterationLock();
909 UCHAR iInterface, numFound;
932 "Validation of the config descriptor failed due to a bad common descriptor header, %!STATUS!",
960 "Validation of interface descriptors in config descriptor failed, %!STATUS!",
987 "Could not allocate memory for %d interfaces, %!STATUS!",
1012 while (pInterfaceDescriptor !=
NULL &&
1013 iInterface < m_ConfigDescriptor->bNumInterfaces) {
1019 pInterfaceDescriptor->bInterfaceNumber) ==
FALSE) {
1025 pInterfaceDescriptor);
1031 "Could not allocate memory for interface object #%d, %!STATUS!",
1052#if (FX_CORE_MODE == FX_CORE_USER_MODE)
1059 pInterfaceDescriptor->bNumEndpoints);
1074 pInterfaceDescriptor->bLength),
1102 "Config descriptor indicated there were %d interfaces, but did not "
1103 "find any interface descriptors in config descriptor %p, %!STATUS!",
1109 "Config descriptor indicated there were 0 interfaces, but an interface "
1110 "descriptor was found");
1117 "Config descriptor indicated there were %d interfaces, only found "
1149 status = syncRequest.Initialize();
1152 "Failed to initialize FxSyncRequest");
1211#if (FX_CORE_MODE == FX_CORE_USER_MODE)
1217#elif (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
1246 "Failed to initialize FxSyncRequest");
1297 if (*ConfigDescriptorLength < m_ConfigDescriptor->wTotalLength) {
1333 ULONG numInterfaces;
1338 configurationDescriptor =
Params->Types.Descriptor.ConfigurationDescriptor;
1339 interfaceDescriptors =
Params->Types.Descriptor.InterfaceDescriptors;
1340 numInterfaces =
Params->Types.Descriptor.NumInterfaceDescriptors;
1342 for (
i = 0;
i < numInterfaces;
i++) {
1343 if (interfaceDescriptors[
i] ==
NULL) {
1351 status = RtlULongAdd(numInterfaces, 1, &
size);
1364 if (pInterfaces ==
NULL) {
1369 "Could not allocate array of USBD_INTERFACE_LIST_ENTRY, %!STATUS!",
1377 for (
i = 0;
i < numInterfaces;
i++) {
1381 if (configurationDescriptor ==
NULL) {
1397 configurationDescriptor,
1482 if (NumConfiguredInterfaces !=
NULL) {
1483 *NumConfiguredInterfaces = 0;
1492 "Failed to initialize FxSyncRequest");
1522 if (pPipeInfo ==
NULL) {
1526 "Could not internal allocate tracking info for selecting a config on "
1556 "WDFUSBDEVICE supports a maximum of %d pipes per interface, "
1557 "USBD_INTERFACE_INFORMATION %p specified %d, %!STATUS!",
1567 "Could not find an instance of an interface descriptor with "
1568 "InterfaceNumber %d, %!STATUS!",
1579 if (numPipes > maxNumPipes) {
1580 maxNumPipes = (
USHORT) numPipes;
1601 if (ppPipes ==
NULL) {
1605 "Could not allocate memory for Pipes "
1606 "InterfaceNumber %d, %!STATUS!",
1618 pPipeInfo[intfIndex].
Pipes = ppPipes;
1619 pPipeInfo[intfIndex].
NumPipes = numPipes;
1621 for (iPipe = 0; iPipe < numPipes; iPipe++) {
1625 if (ppPipes[iPipe] ==
NULL) {
1629 "Could not allocate a pipe object, %!STATUS!",
status);
1633 pPipe = ppPipes[iPipe];
1638 "Could not Init the pipe object, %!STATUS!",
status);
1646 "Could not commit the pipe object, %!STATUS!",
status);
1683 if (pSelectUrb ==
NULL) {
1687 "Could not allocate a select interface URB, %!STATUS!",
status);
1760#pragma prefast(suppress: __WARNING_UNUSED_POINTER_ASSIGNMENT, "pIface is used in the for loop in many places. It looks like a false positive")
1779 irp =
request.m_TrueRequest->GetSubmitFxIrp();
1782 request.m_TrueRequest->ClearFieldsForReuse();
1792 "USB core failed Select Interface URB, %!STATUS!",
1828 if (NumConfiguredInterfaces !=
NULL) {
1829 *NumConfiguredInterfaces = intfIndex;
1835 "USB core failed Select Configuration, %!STATUS!",
status);
1839 if (pSelectUrb !=
NULL) {
1844 if (pPipeInfo !=
NULL) {
1853 if (pPipeInfo[intfIndex].Pipes !=
NULL) {
1857 for (iPipe = 0; iPipe < pPipeInfo[intfIndex].
NumPipes; iPipe++) {
1858 if (pPipeInfo[intfIndex].Pipes[iPipe] !=
NULL) {
1860 pPipeInfo[intfIndex].
Pipes[iPipe] =
NULL;
1898 "Failed to initialize FxSyncRequest");
1914#pragma prefast(suppress: __WARNING_BUFFER_OVERFLOW, "this annotation change in usb.h is communicated to usb team");
1916#pragma prefast(suppress: __WARNING_BUFFER_OVERFLOW, "this annotation change in usb.h is communicated to usb team");
1947 status = RtlULongAdd(NumInterfaces, 1, &
size);
1957 for (
i = 0;
i < NumInterfaces;
i++) {
1958 if (InterfaceDescriptors[
i] ==
NULL) {
1969 if (pInterfaces ==
NULL) {
1974 "Could not allocate array of USBD_INTERFACE_LIST_ENTRY, %!STATUS!",
1982 for (
i = 0;
i < NumInterfaces;
i++) {
1986 if (ConfigurationDescriptor ==
NULL) {
1991 ConfigurationDescriptor,
2070 AcquireInterfaceIterationLock();
2073 for (iPipe = 0; iPipe <
UsbInterface->m_NumberOfConfiguredPipes; iPipe++) {
2089 for (iPipe = 0; iPipe <
UsbInterface->m_NumberOfConfiguredPipes; iPipe++) {
2096 ReleaseInterfaceIterationLock();
2105 ULONG iInterface, iPipe;
2160 "Urb must be parented to FxDevice or an IoAllocated Request");
2194 "USBDEVICE Must have been created with Client Contract Version Info, %!STATUS!",
2278 "Urb must be parented to FxDevice or IoAllocated Request");
2312 "USBDEVICE Must have been created with Client Contract Version Info, %!STATUS!",
2402 isObjectDisposedOnRemove =
TRUE;
2409 if (
request->IsAllocatedFromIo()) {
2411 isObjectDisposedOnRemove =
TRUE;
2435 return isObjectDisposedOnRemove;
2470 if (
Request->IsAllocatedFromIo()) {
struct outqueuenode * head
MdDeviceObject __inline GetDeviceObject(VOID)
virtual VOID Stop(__in WDF_IO_TARGET_SENT_IO_ACTION Action)
_Must_inspect_result_ NTSTATUS SubmitSync(__in FxRequestBase *Request, __in_opt PWDF_REQUEST_SEND_OPTIONS Options=NULL, __out_opt PULONG Action=NULL)
_Must_inspect_result_ NTSTATUS SubmitSyncRequestIgnoreTargetState(__in FxRequestBase *Request, __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions)
_Must_inspect_result_ NTSTATUS Init(__in CfxDeviceBase *Device)
virtual BOOLEAN Dispose(VOID)
WDF_IO_TARGET_STATE m_State
VOID CompletePendedRequest(__in FxRequestBase *Request)
VOID CompletePendedRequestList(__in PLIST_ENTRY RequestListHead)
_Must_inspect_result_ NTSTATUS FormatInternalIoctlOthersRequest(__in FxRequestBase *Request, __in ULONG Ioctl, __in FxRequestBuffer *Buffers)
static VOID _CancelSentRequests(__in PSINGLE_LIST_ENTRY RequestListHead)
VOID SubmitPendedRequest(__in FxRequestBase *Request)
_Must_inspect_result_ NTSTATUS FormatIoctlRequest(__in FxRequestBase *Request, __in ULONG Ioctl, __in BOOLEAN Internal, __in FxRequestBuffer *InputBuffer, __in FxRequestBuffer *OutputBuffer, __in_opt FxFileObject *FileObject=NULL)
virtual VOID Purge(__in WDF_IO_TARGET_PURGE_IO_ACTION Action)
virtual _Must_inspect_result_ NTSTATUS Start(VOID)
virtual VOID WaitForSentIoToComplete(VOID)
VOID Reuse(__in NTSTATUS Status=STATUS_SUCCESS)
virtual PVOID GetBuffer(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
CfxDeviceBase * m_DeviceBase
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
virtual BOOLEAN Dispose(VOID)
VOID DeleteFromFailedCreate(VOID)
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
static __inline FxRequestBase * _FromListEntry(__in PLIST_ENTRY Entry)
__inline FxIoTarget * GetTarget(VOID)
_Must_inspect_result_ NTSTATUS CreateInterfaces(VOID)
virtual VOID Purge(__in WDF_IO_TARGET_PURGE_IO_ACTION Action)
virtual BOOLEAN Dispose(VOID)
WINUSB_INTERFACE_HANDLE m_WinUsbHandle
VOID PipesGotoRemoveState(__in BOOLEAN ForceRemovePipes)
USBD_PIPE_HANDLE m_ControlPipe
VOID GetInformation(__out PWDF_USB_DEVICE_INFORMATION Information)
_Must_inspect_result_ NTSTATUS SelectConfig(__in PWDF_OBJECT_ATTRIBUTES PipesAttributes, __in PURB Urb, __in FX_URB_TYPE FxUrbType, __out_opt PUCHAR NumConfiguredInterfaces)
virtual VOID Stop(__in WDF_IO_TARGET_SENT_IO_ACTION Action)
VOID CleanupInterfacePipesAndDelete(__in FxUsbInterface *UsbInterface)
USB_DEVICE_DESCRIPTOR m_DeviceDescriptor
_Must_inspect_result_ NTSTATUS FormatCycleRequest(__in FxRequestBase *Request)
virtual _Must_inspect_result_ NTSTATUS Start(VOID)
_Must_inspect_result_ NTSTATUS IsConnected(VOID)
PINTERFACE_DEREFERENCE m_BusInterfaceDereference
PUSB_BUSIFFN_QUERY_BUS_TIME m_QueryBusTime
USBD_VERSION_INFORMATION m_UsbdVersionInformation
_Must_inspect_result_ NTSTATUS GetPortStatus(__out PULONG PortStatus)
IWudfFile * m_pHostTargetFile
VOID RemoveDeletedInterface(__in FxUsbInterface *Interface)
ULONG GetDefaultMaxTransferSize(VOID)
BOOLEAN IsObjectDisposedOnRemove(__in FxObject *Object)
FxUsbDevice(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
static VOID _CleanupPipesRequests(__in PLIST_ENTRY PendHead, __in PSINGLE_LIST_ENTRY SentHead)
__checkReturn NTSTATUS CreateUrb(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out WDFMEMORY *UrbMemory, __deref_opt_out_bcount(sizeof(URB)) PURB *Urb)
_Must_inspect_result_ NTSTATUS CyclePort(VOID)
FxUsbInterface * GetInterfaceFromIndex(__in UCHAR InterfaceIndex)
_Must_inspect_result_ NTSTATUS GetConfigDescriptor(__out PVOID ConfigDescriptor, __inout PUSHORT ConfigDescriptorLength)
PUSB_CONFIGURATION_DESCRIPTOR m_ConfigDescriptor
_Must_inspect_result_ NTSTATUS SelectConfigInterfaces(__in PWDF_OBJECT_ATTRIBUTES PipesAttributes, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor, __in_ecount(NumInterfaces) PUSB_INTERFACE_DESCRIPTOR *InterfaceDescriptors, __in ULONG NumInterfaces)
ULONG m_HcdPortCapabilities
__checkReturn NTSTATUS CreateIsochUrb(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG NumberOfIsochPackets, __out WDFMEMORY *UrbMemory, __deref_opt_out_bcount(GET_ISOCH_URB_SIZE(NumberOfIsochPackets)) PURB *Urb)
PVOID m_BusInterfaceContext
_Must_inspect_result_ NTSTATUS GetInterfaceNumberFromInterface(__in WDFUSBINTERFACE UsbInterface, __out PUCHAR InterfaceNumber)
FX_URB_TYPE GetFxUrbTypeForRequest(__in FxRequestBase *Request)
_Must_inspect_result_ NTSTATUS Deconfig(VOID)
FxUsbInterface ** m_Interfaces
FxUsbInterface * GetInterfaceFromNumber(__in UCHAR InterfaceNumber)
_Must_inspect_result_ NTSTATUS SelectConfigDescriptor(__in PWDF_OBJECT_ATTRIBUTES PipeAttributes, __in PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params)
USBD_CONFIGURATION_HANDLE m_ConfigHandle
BOOLEAN m_MismatchedInterfacesInConfigDescriptor
FxUsbPipe ** m_ConfiguredPipes
VOID FormatSelectSettingUrb(__in_bcount(GET_SELECT_INTERFACE_REQUEST_SIZE(NumEndpoints)) PURB Urb, __in USHORT NumEndpoints, __in UCHAR SettingNumber)
VOID CleanUpAndDelete(__in BOOLEAN ClearDestroyCallback)
VOID SetConfiguredPipes(__in FxUsbPipe **ppPipes)
UCHAR GetInterfaceNumber(VOID)
BOOLEAN IsInterfaceConfigured(VOID)
UCHAR m_NumberOfConfiguredPipes
VOID SetInfo(__in PUSBD_INTERFACE_INFORMATION Interface)
VOID SetNumConfiguredPipes(__in UCHAR NumberOfPipes)
VOID GotoPurgeState(__in WDF_IO_TARGET_PURGE_IO_ACTION Action, __in PLIST_ENTRY PendedRequestListHead, __in PSINGLE_LIST_ENTRY SentRequestListHead, __out PBOOLEAN Wait, __in BOOLEAN LockSelf)
virtual VOID GotoStopState(__in WDF_IO_TARGET_SENT_IO_ACTION Action, __in PSINGLE_LIST_ENTRY SentRequestListHead, __out PBOOLEAN Wait, __in BOOLEAN LockSelf)
virtual VOID GotoRemoveState(__in WDF_IO_TARGET_STATE NewState, __in PLIST_ENTRY PendedRequestListHead, __in PSINGLE_LIST_ENTRY SentRequestListHead, __in BOOLEAN Lock, __out PBOOLEAN Wait)
virtual VOID WaitForSentIoToComplete(VOID)
virtual _Must_inspect_result_ NTSTATUS GotoStartState(__in PLIST_ENTRY RequestListHead, __in BOOLEAN Lock=TRUE)
virtual BOOLEAN Dispose(VOID)
FxUsbUrb(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USBD_HANDLE USBDHandle, __in_bcount(BufferSize) PVOID Buffer, __in size_t BufferSize)
virtual size_t GetBufferSize(VOID)=0
virtual PVOID GetBuffer(VOID)=0
static __inline VOID MxUnlockPages(__in PMDL Mdl)
static __inline KIRQL MxGetCurrentIrql()
#define NT_SUCCESS(StatCode)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE,(PVOID *)&pDevice, &pFxDriverGlobals)
PFX_DRIVER_GLOBALS pFxDriverGlobals
FxObjectHandleGetPtr(GetFxDriverGlobals(DriverGlobals), Fdo, FX_TYPE_DEVICE,(PVOID *)&pFdo)
__inline BOOLEAN FxObjectCheckType(__in FxObject *Object, __in WDFTYPE Type)
#define FxPointerNotNull(FxDriverGlobals, Ptr)
VOID __inline FxMdlFree(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PMDL Mdl)
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
#define FX_REQUEST_NUM_OTHER_PARAMS
@ FX_RCT_USB_CONTROL_REQUEST
@ FX_RCT_USB_STRING_REQUEST
@ FX_TYPE_IO_TARGET_USB_DEVICE
enum _FX_URB_TYPE FX_URB_TYPE
FxUsbInterface * pUsbInterface
return pUsbInterface GetInterfaceNumber()
_Must_inspect_result_ NTSTATUS __inline FxValidateObjectAttributesForParentHandle(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
_Must_inspect_result_ NTSTATUS FxValidateObjectAttributes(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLuint GLsizei GLsizei * length
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
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
#define _Must_inspect_result_
#define UNREFERENCED_PARAMETER(P)
#define STATUS_DEVICE_DOES_NOT_EXIST
#define __deref_opt_out_bcount(size)
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_ERROR
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
WDF_REQUEST_COMPLETION_PARAMS m_CompletionParams
IFxMemory * m_RequestMemory
_URB_CONTROL_TRANSFER * m_Urb
~FxUsbDeviceControlContext(VOID)
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
FxUsbDeviceControlContext(__in FX_URB_TYPE FxUrbType)
USBD_STATUS GetUsbdStatus(VOID)
_URB_CONTROL_TRANSFER m_UrbLegacy
virtual VOID CopyParameters(__in FxRequestBase *Request)
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
virtual VOID Dispose(VOID)
virtual VOID Dispose(VOID)
FxUsbDeviceStringContext(__in FX_URB_TYPE FxUrbType)
VOID SetUrbInfo(__in UCHAR StringIndex, __in USHORT LangID)
PUSB_STRING_DESCRIPTOR m_StringDescriptor
ULONG m_StringDescriptorLength
virtual VOID CopyParameters(__in FxRequestBase *Request)
_Must_inspect_result_ NTSTATUS AllocateDescriptor(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t BufferSize)
USBD_STATUS GetUsbdStatus(VOID)
~FxUsbDeviceStringContext(VOID)
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
_URB_CONTROL_DESCRIPTOR_REQUEST m_UrbLegacy
_URB_CONTROL_DESCRIPTOR_REQUEST * m_Urb
VOID SetUsbType(__in WDF_USB_REQUEST_TYPE Type)
WDF_USB_REQUEST_COMPLETION_PARAMS m_UsbParameters
virtual VOID CopyParameters(__in FxRequestBase *Request)
struct _SINGLE_LIST_ENTRY * Next
struct _UMURB_CONTROL_TRANSFER UmUrbControlTransfer
struct _UMURB_DESCRIPTOR_REQUEST UmUrbDescriptorRequest
ULONG TransferBufferLength
ULONG TransferBufferLength
struct _URB_SELECT_INTERFACE UrbSelectInterface
PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@4014::@4015 DeviceString
union _WDF_USB_REQUEST_COMPLETION_PARAMS::@4014 Parameters
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@4014::@4016 DeviceControlTransfer
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_DEVICE_DATA_ERROR
#define STATUS_INSUFFICIENT_RESOURCES
struct _USB_STRING_DESCRIPTOR * PUSB_STRING_DESCRIPTOR
struct _USB_INTERFACE_DESCRIPTOR * PUSB_INTERFACE_DESCRIPTOR
#define USB_STRING_DESCRIPTOR_TYPE
struct _USB_STRING_DESCRIPTOR USB_STRING_DESCRIPTOR
#define USB_INTERFACE_DESCRIPTOR_TYPE
struct _USB_COMMON_DESCRIPTOR USB_COMMON_DESCRIPTOR
struct _USBD_INTERFACE_INFORMATION * PUSBD_INTERFACE_INFORMATION
#define USBD_DEFAULT_MAXIMUM_TRANSFER_SIZE
#define URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE
NTSTATUS USBD_UrbAllocate(_In_ USBD_HANDLE USBDHandle, _Outptr_result_bytebuffer_(sizeof(URB)) PURB *Urb)
NTSTATUS USBD_IsochUrbAllocate(_In_ USBD_HANDLE USBDHandle, _In_ ULONG NumberOfIsochPacket, _Outptr_result_bytebuffer_(sizeof(struct _URB_ISOCH_TRANSFER)+(NumberOfIsochPackets *sizeof(USBD_ISO_PACKET_DESCRIPTOR)) - sizeof(USBD_ISO_PACKET_DESCRIPTOR)) PURB *Urb)
VOID USBD_UrbFree(_In_ USBD_HANDLE USBDHandle, _In_ PURB Urb)
#define UsbBuildSelectConfigurationRequest(urb, length, configurationDescriptor)
_Must_inspect_result_ _In_ PDEVICE_OBJECT _In_ ULONG _In_ ULONG _Out_ USBD_HANDLE * USBDHandle
VOID USBD_CloseHandle(_In_ USBD_HANDLE USBDHandle)
#define GET_SELECT_INTERFACE_REQUEST_SIZE(totalPipes)
struct _USBD_INTERFACE_LIST_ENTRY * PUSBD_INTERFACE_LIST_ENTRY
_In_ PIO_STACK_LOCATION _In_ PURB Urb
#define GET_ISO_URB_SIZE(n)
_In_ PVOID _In_ LONG InterfaceNumber
#define IOCTL_INTERNAL_USB_CYCLE_PORT
#define USBD_PORT_ENABLED
#define USBD_PORT_CONNECTED
#define IOCTL_INTERNAL_USB_GET_PORT_STATUS
PUSB_COMMON_DESCRIPTOR FxUsbFindDescriptorType(__in PVOID Buffer, __in size_t BufferLength, __in PVOID Start, __in LONG DescriptorType)
NTSTATUS FxUsbValidateDescriptorType(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor, __in PVOID Start, __in PVOID End, __in LONG DescriptorType, __in size_t SizeToValidate, __in FxUsbValidateDescriptorOp Op, __in ULONG MaximumNumDescriptorsToValidate)
NTSTATUS FxUsbValidateConfigDescriptorHeaders(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigDescriptor, __in size_t ConfigDescriptorLength)
PURB FxUsbCreateConfigRequest(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PUSB_CONFIGURATION_DESCRIPTOR ConfigDesc, __in PUSBD_INTERFACE_LIST_ENTRY InterfaceList, __in ULONG DefaultMaxPacketSize)
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)
@ FxUsbValidateDescriptorOpAtLeast
BOOLEAN __inline FxBitArraySet(__inout_xcount((BitNumber/sizeof(UCHAR))+1) PUCHAR BitArray, __in UCHAR BitNumber)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
FORCEINLINE LONGLONG WDF_REL_TIMEOUT_IN_SEC(_In_ ULONGLONG Time)
#define WDF_PTR_ADD_OFFSET(_ptr, _offset)
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
enum _WDF_IO_TARGET_PURGE_IO_ACTION WDF_IO_TARGET_PURGE_IO_ACTION
@ WdfIoTargetLeaveSentIoPending
enum _WDF_IO_TARGET_SENT_IO_ACTION WDF_IO_TARGET_SENT_IO_ACTION
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
FORCEINLINE VOID WDF_REQUEST_SEND_OPTIONS_INIT(_Out_ PWDF_REQUEST_SEND_OPTIONS Options, _In_ ULONG Flags)
@ WDF_REQUEST_SEND_OPTION_IGNORE_TARGET_STATE
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
FORCEINLINE VOID WDF_REQUEST_SEND_OPTIONS_SET_TIMEOUT(_Inout_ PWDF_REQUEST_SEND_OPTIONS Options, _In_ LONGLONG Timeout)
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
#define STATUS_WDF_PARENT_NOT_SPECIFIED
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
#define WDF_NO_OBJECT_ATTRIBUTES
_In_ WDFUSBINTERFACE UsbInterface
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ WDFMEMORY UrbMemory
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ ULONG NumberOfIsochPackets
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID _Inout_ PUSHORT ConfigDescriptorLength
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR StringIndex
@ WdfUsbRequestTypeDeviceString
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR _In_opt_ USHORT LangID
_In_ WDFUSBDEVICE _In_ UCHAR InterfaceIndex
_Must_inspect_result_ _In_ WDFUSBINTERFACE _In_opt_ PWDF_OBJECT_ATTRIBUTES PipesAttributes
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList