25#include "FxUsbDeviceAPI.tmh"
189WDFEXPORT(WdfUsbTargetDeviceCreateWithParameters)(
237 "WDF_USB_DEVICE_CREATE_CONFIG Size 0x%x, expected 0x%x, %!STATUS!",
245 Config->USBDClientContractVersion,
254WDFEXPORT(WdfUsbTargetDeviceRetrieveInformation)(
280 "Information size %d, expected %d %!STATUS!",
294WDFEXPORT(WdfUsbTargetDeviceGetDeviceDescriptor)(
329WDFEXPORT(WdfUsbTargetDeviceRetrieveConfigDescriptor)(
424WDFEXPORT(WdfUsbTargetDeviceAllocAndQueryString)(
510 pBuffer->DeleteFromFailedCreate();
520WDFEXPORT(WdfUsbTargetDeviceFormatRequestForString)(
574 "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p, StringIndex %d, LandID 0x%x",
605 "WDFMEMORY %p length must be even number of WCHARs, but is %I64d in "
634 "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p, %!STATUS!",
644WDFEXPORT(WdfUsbTargetDeviceSelectConfig)(
677 "Params size %d, expected %d %!STATUS!",
693 "Params Type %d not a valid value, %!STATUS!",
699#if (FX_CORE_MODE == FX_CORE_USER_MODE)
706 "Params Type %d not supported for UMDF, %!STATUS!",
721 if (
pUsbDevice->HasMismatchedInterfacesInConfigDescriptor()) {
730 "WDFUSBDEVICE %p number of interfaces found in the config descriptor "
731 "does not match bNumInterfaces in config descriptor, failing config "
732 "operation %!WdfUsbTargetDeviceSelectConfigType!, %!STATUS!",
737 else if (
pUsbDevice->GetNumInterfaces() == 0) {
745 "WDFUSBDEVICE %p succeeding config operation "
746 "%!WdfUsbTargetDeviceSelectConfigType! on zero interfaces "
754#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
761 if (
Params->Types.Descriptor.InterfaceDescriptors ==
NULL ||
762 Params->Types.Descriptor.NumInterfaceDescriptors == 0) {
766 "Either InterfaceDescriptor is NULL or NumInterfaceDescriptors is zero "
767 "WDFUSBDEVICE %p InterfaceDescriptor %p NumInterfaceDescriptors 0x%x"
768 "%!WdfUsbTargetDeviceSelectConfigType! %!STATUS!",
UsbDevice,
769 Params->Types.Descriptor.InterfaceDescriptors,
770 Params->Types.Descriptor.NumInterfaceDescriptors,
790 Params->Types.Urb.Urb->UrbHeader.Length <
795 "Either URB passed in was NULL or the URB Function or Length was invalid "
796 " WDFUSBDEVICE %p Urb 0x%p "
797 "%!WdfUsbTargetDeviceSelectConfigType!"
820 if (
Params->Types.MultiInterface.Pairs ==
NULL) {
825 "WDFUSBDEVICE %p SettingPairs Array passed is NULL, %!STATUS!",
830 else if (
Params->Types.MultiInterface.NumberInterfaces !=
836 "WDFUSBDEVICE %p MultiInterface.NumberInterfaces %d != %d "
837 "(reported num interfaces), %!STATUS!",
839 Params->Types.MultiInterface.NumberInterfaces,
853 i <
Params->Types.MultiInterface.NumberInterfaces;
869 if (
pair->SettingIndex >= numSettings) {
874 "WDFUSBDEVICE %p SettingPairs contains invalid SettingIndex"
875 " for WDFUSBINTERFACE %p. Setting index passed in: %d, "
876 "max index: %d, returning %!STATUS!",
909WDFEXPORT(WdfUsbTargetDeviceGetNumInterfaces)(
932WDFEXPORT(WdfUsbTargetDeviceWdmGetConfigurationHandle)(
954WDFEXPORT(WdfUsbTargetDeviceSendControlTransferSynchronously)(
1017 "Failed to initialize FxSyncRequest");
1022 "WDFUSBDEVICE %p control transfer sync",
UsbDevice);
1053 "WDFUSBDEVICE %p, WDFREQUEST %p being submitted",
1060#if (FX_CORE_MODE == FX_CORE_KERNEL_MODE)
1062#elif (FX_CORE_MODE == FX_CORE_USER_MODE)
1081WDFEXPORT(WdfUsbTargetDeviceFormatRequestForControlTransfer)(
1134 "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p",
1181 "format control request WDFUSBDEVICE %p, WDFREQWUEST %p, WDFMEMORY %p, %!STATUS!",
1191WDFEXPORT(WdfUsbTargetDeviceResetPortSynchronously)(
1220#pragma warning(disable:28285)
1225WDFEXPORT(WdfUsbTargetDeviceCreateIsochUrb)(
1290 "USBDEVICE Must have been created with Client Contract Verion Info, %!STATUS!",
1307WDFEXPORT(WdfUsbTargetDeviceGetInterface)(
1348 "WDFUSBDEVICE %p has %d interfaces, index %d requested, returning "
1360WDFEXPORT(WdfUsbTargetDeviceQueryUsbCapability)(
1372 PVOID CapabilityBuffer,
static _Must_inspect_result_ NTSTATUS _Create(__in PFX_DRIVER_GLOBALS DriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in POOL_TYPE PoolType, __in ULONG PoolTag, __in size_t BufferSize, __out FxMemoryObject **Object)
__inline FxRequestContext * GetContext(VOID)
UCHAR GetNumSettings(VOID)
WDFUSBINTERFACE GetHandle(VOID)
_Must_inspect_result_ NTSTATUS ValidateMemoryOffsets(__in_opt PWDFMEMORY_OFFSET Offsets)
#define STATUS_NOT_SUPPORTED
#define __out_ecount_opt(x)
#define NT_SUCCESS(StatCode)
#define __drv_when(cond, annotes)
#define __drv_maxIRQL(irql)
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
#define FxPointerNotNull(FxDriverGlobals, Ptr)
@ MemoryDescriptorNullAllowed
@ MemoryDescriptorNoBufferAllowed
NTSTATUS __inline FxValidateRequestOptions(_In_ PFX_DRIVER_GLOBALS FxDriverGlobals, _In_ PWDF_REQUEST_SEND_OPTIONS Options, _In_opt_ FxRequestBase *Request=NULL)
@ FX_TYPE_IO_TARGET_USB_DEVICE
return FxUsbTargetDeviceCreate(pFxDriverGlobals, pDevice, USBD_CLIENT_CONTRACT_VERSION_INVALID, Attributes, UsbDevice)
FxUsbInterface * pUsbInterface
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS RequestOptions
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES PipesAttributes
_Must_inspect_result_ __in WDFUSBDEVICE __out PWDF_USB_DEVICE_INFORMATION Information
FxUsbDeviceControlContext context(FxUrbTypeLegacy)
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __out_ecount_opt NumCharacters PUSHORT __inout PUSHORT __in UCHAR StringIndex
FxObjectHandleGetPtr(pFxDriverGlobals, Memory, IFX_TYPE_MEMORY,(PVOID *) &pMemory)
__checkReturn __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __in ULONG __out WDFMEMORY * UrbMemory
_Must_inspect_result_ __in FxDeviceBase * Device
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST Request
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGIOTARGET, "WDFUSBDEVICE %p, WDFREQUEST %p, WDFMEMORY %p, StringIndex %d, LandID 0x%x", UsbDevice, Request, Memory, StringIndex, LangID)
__in WDFUSBDEVICE __in UCHAR InterfaceIndex
_Must_inspect_result_ __in FxDeviceBase __in ULONG USBDClientContractVersion
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __out_ecount_opt NumCharacters PUSHORT __inout PUSHORT NumCharacters
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in WDFMEMORY Memory
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES StringMemoryAttributes
_Must_inspect_result_ __in WDFUSBDEVICE __in CONST GUID __in ULONG CapabilityBufferLength
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE_BASE,(PVOID *)&pDevice, &pFxDriverGlobals)
__checkReturn __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __in ULONG NumberOfIsochPackets
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt WDFMEMORY TransferMemory
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt PWDF_MEMORY_DESCRIPTOR __out_opt PULONG BytesTransferred
__checkReturn __in WDFDEVICE __in PWDF_USB_DEVICE_CREATE_CONFIG Config
_Must_inspect_result_ __in WDFUSBDEVICE __in CONST GUID * CapabilityType
_Must_inspect_result_ __in FxDeviceBase __in ULONG __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFUSBDEVICE * UsbDevice
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in WDFMEMORY __in_opt PWDFMEMORY_OFFSET Offset
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __out WDFMEMORY * StringMemory
__in WDFUSBDEVICE __out PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor
_Must_inspect_result_ __in FxDeviceBase __in ULONG __in_opt PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ __in WDFUSBDEVICE __in WDFREQUEST __in PWDF_USB_CONTROL_SETUP_PACKET __in_opt WDFMEMORY __in_opt PWDFMEMORY_OFFSET TransferOffset
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt PWDF_OBJECT_ATTRIBUTES __inout PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params
_Must_inspect_result_ __in WDFUSBDEVICE __in_opt WDFREQUEST __in_opt PWDF_REQUEST_SEND_OPTIONS __out_ecount_opt NumCharacters PUSHORT __inout PUSHORT __in UCHAR __in_opt USHORT LangID
PFX_DRIVER_GLOBALS pFxDriverGlobals
@ FX_VALIDATE_OPTION_PARENT_NOT_ALLOWED
_Must_inspect_result_ NTSTATUS FxValidateObjectAttributes(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in ULONG Flags=FX_VALIDATE_OPTION_NONE_SPECIFIED)
__inline NTSTATUS FxVerifierCheckIrqlLevel(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)
GLenum GLuint GLenum GLsizei const GLchar * buf
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_
_In_ ULONG _In_ ULONG Offset
#define __deref_out_range(x, y)
#define __out_bcount_part_opt(size, length)
#define __deref_opt_out_bcount(size)
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_ERROR
WDF_USB_REQUEST_COMPLETION_PARAMS m_UsbParameters
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@3909::@3910 DeviceString
union _WDF_USB_REQUEST_COMPLETION_PARAMS::@3909 Parameters
struct _WDF_USB_REQUEST_COMPLETION_PARAMS::@3909::@3911 DeviceControlTransfer
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_INVALID_PARAMETER
#define STATUS_INVALID_DEVICE_STATE
#define STATUS_INFO_LENGTH_MISMATCH
#define STATUS_INSUFFICIENT_RESOURCES
#define URB_FUNCTION_SELECT_CONFIGURATION
#define USBD_CLIENT_CONTRACT_VERSION_INVALID
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS RequestOptions
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG _In_ _Out_ WDFMEMORY * Memory
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ CONST GUID _In_ ULONG CapabilityBufferLength
_In_ WDFUSBDEVICE _Out_ PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ WDFMEMORY UrbMemory
_Must_inspect_result_ _In_ WDFDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFUSBDEVICE * UsbDevice
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ WDFMEMORY _In_opt_ PWDFMEMORY_OFFSET TransferOffset
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ ULONG NumberOfIsochPackets
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES StringMemoryAttributes
_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 _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR MemoryDescriptor
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT NumCharacters
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ CONST GUID * CapabilityType
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR StringIndex
_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
@ WdfUsbTargetDeviceSelectConfigTypeUrb
@ WdfUsbTargetDeviceSelectConfigTypeInterfacesPairs
@ WdfUsbTargetDeviceSelectConfigTypeSingleInterface
@ WdfUsbTargetDeviceSelectConfigTypeInterfacesDescriptor
@ WdfUsbTargetDeviceSelectConfigTypeDeconfig
@ WdfUsbTargetDeviceSelectConfigTypeMultiInterface
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFMEMORY * StringMemory
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ WDFMEMORY TransferMemory
_In_ WDFUSBDEVICE _In_ UCHAR InterfaceIndex
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
_Must_inspect_result_ _In_ WDFUSBINTERFACE _In_opt_ PWDF_OBJECT_ATTRIBUTES PipesAttributes
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET _In_opt_ PWDF_MEMORY_DESCRIPTOR _Out_opt_ PULONG BytesTransferred