ReactOS  0.4.15-dev-3295-gaa8fc87
fxusbdevice.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxUsbDevice.hpp
8 
9 Abstract:
10 
11 Author:
12 
13 Environment:
14 
15  kernel mode only
16 
17 Revision History:
18 
19 --*/
20 
21 #ifndef _FXUSBDEVICE_H_
22 #define _FXUSBDEVICE_H_
23 
24 #include "fxusbrequestcontext.hpp"
25 
26 typedef enum _FX_URB_TYPE : UCHAR {
29 } FX_URB_TYPE;
30 
33  __in FX_URB_TYPE FxUrbType
34  );
35 
37  VOID
38  );
39 
41  NTSTATUS
43  __in USBD_HANDLE USBDHandle
44  );
45 
46  virtual
47  VOID
48  Dispose(
49  VOID
50  );
51 
52  virtual
53  VOID
56  );
57 
58  VOID
63  );
64 
65  virtual
66  VOID
69  );
70 
73  VOID
74  );
75 
76 private:
77  USBD_HANDLE m_USBDHandle;
78 
79 public:
80 
82 
83  //
84  // m_Urb will either point to m_UrbLegacy or one allocated by USBD_UrbAllocate
85  //
87 
89 
91 };
92 
95  __in FX_URB_TYPE FxUrbType
96  );
97 
99  VOID
100  );
101 
103  NTSTATUS
104  AllocateUrb(
105  __in USBD_HANDLE USBDHandle
106  );
107 
108  virtual
109  VOID
110  Dispose(
111  VOID
112  );
113 
114  virtual
115  VOID
118  );
119 
120  VOID
121  SetUrbInfo(
124  );
125 
128  VOID
129  );
130 
132  NTSTATUS
134  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
135  __in size_t BufferSize
136  );
137 
138 private:
139  USBD_HANDLE m_USBDHandle;
140 
141 public:
142 
144 
145  //
146  // m_Urb will either point to m_UrbLegacy or one allocated by USBD_UrbAllocate
147  //
149 
151 
153 };
154 
156 public:
157 
158  FxUsbUrb(
159  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
160  __in USBD_HANDLE USBDHandle,
162  __in size_t BufferSize
163  );
164 
165 protected:
166 
167  virtual
168  BOOLEAN
169  Dispose(
170  VOID
171  );
172 
173  ~FxUsbUrb();
174 
175 private:
176 
177  USBD_HANDLE m_USBDHandle;
178 };
179 
180 
181 #define FX_USB_DEVICE_TAG 'sUfD'
182 
183 class FxUsbDevice : public FxIoTarget {
184 public:
185  friend FxUsbPipe;
187 
188  FxUsbDevice(
189  __in PFX_DRIVER_GLOBALS FxDriverGlobals
190  );
191 
193  NTSTATUS
194  InitDevice(
195  __in ULONG USBDClientContractVersionForWdfClient
196  );
197 
199  NTSTATUS
203  );
204 
206  NTSTATUS
207  GetString(
212  __in_opt WDFREQUEST Request = NULL,
214  );
215 
216  __inline
217  VOID
220  )
221  {
224  sizeof(m_DeviceDescriptor));
225  }
226 
227  VOID
230  );
231 
232  __inline
235  VOID
236  )
237  {
238  return m_ConfigHandle;
239  }
240 
242  __inline
243  NTSTATUS
245  __in PULONG Current
246  )
247  {
248  if (m_QueryBusTime != NULL) {
249  return m_QueryBusTime(m_BusInterfaceContext, Current);
250  }
251  else {
252  return STATUS_UNSUCCESSFUL;
253  }
254  }
255 
257  NTSTATUS
260  );
261 
263  NTSTATUS
266  __in PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor,
267  __in_ecount(NumInterfaces)PUSB_INTERFACE_DESCRIPTOR* InterfaceDescriptors,
268  __in ULONG NumInterfaces
269  );
270 
272  NTSTATUS
273  SelectConfig(
275  __in PURB Urb,
276  __in FX_URB_TYPE FxUrbType,
277  __out_opt PUCHAR NumConfiguredInterfaces
278  );
279 
281  NTSTATUS
282  Deconfig(
283  VOID
284  );
285 
287  NTSTATUS
291  );
292 
294  NTSTATUS
297  __in PURB Urb
298  );
299 
300  UCHAR
302  VOID
303  )
304  {
305  return m_NumInterfaces;
306  }
307 
308  UCHAR
311  );
312 
313  WDFUSBPIPE
316  __in UCHAR EndpointNumber
317  );
318 
320  NTSTATUS
323  __in FxRequestBuffer *RequestBuffer,
326  );
327 
329  NTSTATUS
333  __in FxRequestBuffer *RequestBuffer
334  );
335 
337  NTSTATUS
338  IsConnected(
339  VOID
340  );
341 
343  NTSTATUS
344  Reset(
345  VOID
346  );
347 
349  NTSTATUS
350  CyclePort(
351  VOID
352  );
353 
355  NTSTATUS
358  );
359 
360  BOOLEAN
362  VOID
363  )
364  {
365  return m_OnUSBD;
366  }
367 
370  VOID
371  )
372  {
373  return m_ControlPipe;
374  }
375 
377  NTSTATUS
379  VOID
380  );
381 
383  NTSTATUS
387  );
388 
390  NTSTATUS
394  );
395 
397  NTSTATUS
401  );
402 
406  );
407 
408  BOOLEAN
410  VOID
411  )
412  {
414  }
415 
416  VOID
417  CancelSentIo(
418  VOID
419  );
420 
421  BOOLEAN
422  IsEnabled(
423  VOID
424  );
425 
427  NTSTATUS
429  __in
431  __in
436  PVOID CapabilityBuffer,
437  __out_opt
440  );
441 
443  NTSTATUS
444  CreateUrb(
445  __in_opt
447  __out
448  WDFMEMORY* UrbMemory,
449  __deref_opt_out_bcount(sizeof(URB))
450  PURB* Urb
451  );
452 
453 #ifdef _MSC_VER
454 #pragma warning(disable:28285)
455 #endif
457  NTSTATUS
459  __in_opt
461  __in
463  __out
464  WDFMEMORY* UrbMemory,
465  __deref_opt_out_bcount(GET_ISOCH_URB_SIZE(NumberOfIsochPackets))
466  PURB* Urb
467  );
468 
469  USBD_HANDLE
471  VOID
472  )
473  {
474  return m_USBDHandle;
475  }
476 
479  VOID
480  )
481  {
482  return m_UrbType;
483  }
484 
488  );
489 
490  BOOLEAN
493  );
494 
495 protected:
496  ~FxUsbDevice(
497  VOID
498  );
499 
500  VOID
503  );
504 
505  //
506  // FxIoTarget overrides
507  //
508  virtual
510  NTSTATUS
511  Start(
512  VOID
513  );
514 
515  virtual
516  VOID
517  Stop(
519  );
520 
521  virtual
522  VOID
523  Purge(
525  );
526  // end FxIoTarget overrides
527 
528  VOID
530  __in BOOLEAN ForceRemovePipes
531  );
532 
533  static
534  VOID
536  __in PLIST_ENTRY PendHead,
537  __in PSINGLE_LIST_ENTRY SentHead
538  );
539 
543  );
544 
546  NTSTATUS
548  __in WDFUSBINTERFACE UsbInterface,
550  );
551 
552  VOID
555  );
556 
557  _Acquires_lock_(_Global_critical_region_)
558  VOID
559  AcquireInterfaceIterationLock(
560  VOID
561  )
562  {
564  }
565 
566  _Releases_lock_(_Global_critical_region_)
567  VOID
568  ReleaseInterfaceIterationLock(
569  VOID
570  )
571  {
573  }
574 
575  ULONG
577  VOID
578  );
579 
580  VOID
582  __in PURB Urb,
583  __in USHORT NumEndpoints,
585  __in UCHAR SettingNumber
586  );
587 
588  virtual
589  BOOLEAN
590  Dispose(
591  VOID
592  );
593 
595  NTSTATUS
598  );
599 
600 #if (FX_CORE_MODE == FX_CORE_USER_MODE)
602  NTSTATUS
604  __in FxSyncRequest* Request,
606  );
607 
609  NTSTATUS
611  __inout PUMURB Urb,
613  __in_opt WDFREQUEST Request = NULL,
615  );
616 #endif
617 
618 protected:
619  USBD_HANDLE m_USBDHandle;
620 
622 
624 
626 
628 
630 
632 
634 
636 
638 
640 
642 
644 
646 
648 
650 
652 
653 #if (FX_CORE_MODE == FX_CORE_USER_MODE)
654 private:
655  //
656  // Used to format the IWudfIrp for user-mode requests
657  //
658  IWudfFile* m_pHostTargetFile;
659 
660  //
661  // Handle to the default USB interface exposed by WinUsb
662  //
663  WINUSB_INTERFACE_HANDLE m_WinUsbHandle;
664 #endif
665 };
666 
667 #endif // _FXUSBDEVICE_H_
_URB_CONTROL_DESCRIPTOR_REQUEST m_UrbLegacy
#define __in_bcount(x)
Definition: dbghelp.h:41
_Must_inspect_result_ __inline NTSTATUS GetCurrentFrameNumber(__in PULONG Current)
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ CONST GUID * CapabilityType
Definition: wdfusb.h:1611
_Must_inspect_result_ NTSTATUS CreateInterfaces(VOID)
enum _WDF_IO_TARGET_PURGE_IO_ACTION WDF_IO_TARGET_PURGE_IO_ACTION
friend FxUsbPipe
_FX_URB_TYPE
Definition: fxusbdevice.hpp:26
FX_URB_TYPE GetFxUrbTypeForRequest(__in FxRequestBase *Request)
_In_ WDFUSBDEVICE _In_ UCHAR InterfaceIndex
Definition: wdfusb.h:2459
FxUsbInterface * GetInterfaceFromIndex(__in UCHAR InterfaceIndex)
virtual VOID CopyParameters(__in FxRequestBase *Request)
_Must_inspect_result_ NTSTATUS GetConfigDescriptor(__out PVOID ConfigDescriptor, __inout PUSHORT ConfigDescriptorLength)
_Must_inspect_result_ NTSTATUS SelectInterface(__in PWDF_OBJECT_ATTRIBUTES PipesAttributes, __in PURB Urb)
_URB_CONTROL_DESCRIPTOR_REQUEST * m_Urb
friend FxUsbInterface
_In_ NDIS_HANDLE _In_ PNDIS_PACKET Packet
Definition: ndis.h:1548
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ CONST GUID _In_ ULONG CapabilityBufferLength
Definition: wdfusb.h:1611
_In_ WDFIOTARGET _In_ PWDF_REQUEST_COMPLETION_PARAMS Params
Definition: wdfrequest.h:306
FX_URB_TYPE GetUrbType(VOID)
__checkReturn NTSTATUS CreateUrb(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out WDFMEMORY *UrbMemory, __deref_opt_out_bcount(sizeof(URB)) PURB *Urb)
Definition: ntbasedef.h:628
VOID SetUrbInfo(__in UCHAR StringIndex, __in USHORT LangID)
VOID(WINAPI * PINTERFACE_DEREFERENCE)(PVOID Context)
Definition: precomp.h:16
#define __out_bcount(x)
Definition: dbghelp.h:68
~FxUsbDevice(VOID)
#define __in_opt
Definition: dbghelp.h:38
FX_URB_TYPE m_UrbType
_Must_inspect_result_ NTSTATUS SelectConfig(__in PWDF_OBJECT_ATTRIBUTES PipesAttributes, __in PURB Urb, __in FX_URB_TYPE FxUrbType, __out_opt PUCHAR NumConfiguredInterfaces)
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _In_ PWDF_USB_CONTROL_SETUP_PACKET SetupPacket
Definition: wdfusb.h:1331
__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)
unsigned char * PUCHAR
Definition: retypes.h:3
_In_ WDFUSBINTERFACE _In_ UCHAR _Out_ PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor
Definition: wdfusb.h:2329
_Must_inspect_result_ NTSTATUS SendSyncUmUrb(__inout PUMURB Urb, __in ULONGLONG Time, __in_opt WDFREQUEST Request=NULL, __in_opt PWDF_REQUEST_SEND_OPTIONS Options=NULL)
_Must_inspect_result_ NTSTATUS SelectConfigSingle(__in PWDF_OBJECT_ATTRIBUTES PipeAttributes, __in PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params)
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID _Inout_ PUSHORT ConfigDescriptorLength
Definition: wdfusb.h:1036
USBD_HANDLE GetUSBDHandle(VOID)
_Must_inspect_result_ NTSTATUS Reset(VOID)
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES PipeAttributes
Definition: wdfusb.h:1240
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT _In_ UCHAR StringIndex
Definition: wdfusb.h:1075
_Must_inspect_result_ NTSTATUS GetPortStatus(__out PULONG PortStatus)
ULONG GetDefaultMaxTransferSize(VOID)
_Must_inspect_result_ NTSTATUS FormatControlRequest(__in FxRequestBase *Request, __in PWDF_USB_CONTROL_SETUP_PACKET Packet, __in FxRequestBuffer *RequestBuffer)
virtual VOID Purge(__in WDF_IO_TARGET_PURGE_IO_ACTION Action)
_Must_inspect_result_ NTSTATUS FormatStringRequest(__in FxRequestBase *Request, __in FxRequestBuffer *RequestBuffer, __in UCHAR StringIndex, __in USHORT LangID)
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1044
UCHAR m_NumInterfaces
VOID CancelSentIo(VOID)
enum _FX_URB_TYPE FX_URB_TYPE
VOID StoreAndReferenceMemory(__in FxUsbDevice *Device, __in FxRequestBuffer *Buffer, __in PWDF_USB_CONTROL_SETUP_PACKET SetupPacket)
_Must_inspect_result_ __in WDFIOTARGET __in DEVICE_REGISTRY_PROPERTY __in ULONG __out_opt PVOID __deref_out_range(<=, BufferLength) PULONG ResultLength)
_Must_inspect_result_ NTSTATUS SelectConfigMulti(__in PWDF_OBJECT_ATTRIBUTES PipeAttributes, __in PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params)
BOOLEAN IsObjectDisposedOnRemove(__in FxObject *Object)
enum _WDF_IO_TARGET_SENT_IO_ACTION WDF_IO_TARGET_SENT_IO_ACTION
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ WDFREQUEST _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_writes_opt_ NumCharacters PUSHORT _Inout_ PUSHORT NumCharacters
Definition: wdfusb.h:1075
WINUSB_INTERFACE_HANDLE m_WinUsbHandle
Definition: umusb.h:173
WDFUSBPIPE GetInterfacePipeReferenced(__in UCHAR InterfaceNumber, __in UCHAR EndpointNumber)
#define __out_opt
Definition: dbghelp.h:65
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2430
_Must_inspect_result_ NTSTATUS SelectConfigAuto(__in PWDF_OBJECT_ATTRIBUTES PipeAttributes)
USBD_HANDLE m_USBDHandle
PINTERFACE_DEREFERENCE m_BusInterfaceDereference
__inline USBD_CONFIGURATION_HANDLE GetConfigHandle(VOID)
USBD_STATUS GetUsbdStatus(VOID)
#define __out
Definition: dbghelp.h:62
unsigned char BOOLEAN
_Must_inspect_result_ NTSTATUS SelectConfigDescriptor(__in PWDF_OBJECT_ATTRIBUTES PipeAttributes, __in PWDF_USB_DEVICE_SELECT_CONFIG_PARAMS Params)
_Must_inspect_result_ __in WDFUSBDEVICE __in CONST GUID __in ULONG __out_bcount_part_opt(CapabilityBufferLength, *ResultLength)) PVOID CapabilityBuffer
USBD_PIPE_HANDLE m_ControlPipe
_Must_inspect_result_ _In_ WDFUSBDEVICE _Out_writes_bytes_to_opt_ ConfigDescriptorLength PVOID ConfigDescriptor
Definition: wdfusb.h:1036
Definition: bufpool.h:45
FxUsbDeviceControlContext(__in FX_URB_TYPE FxUrbType)
Definition: fxusbdevice.cpp:36
_Must_inspect_result_ NTSTATUS FormatCycleRequest(__in FxRequestBase *Request)
virtual VOID Dispose(VOID)
FxUsbInterface * GetInterfaceFromNumber(__in UCHAR InterfaceNumber)
_In_ PVOID _In_ LONG InterfaceNumber
Definition: usbdlib.h:168
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3531
_Acquires_lock_(_Global_critical_region_) VOID AcquireInterfaceIterationLock(VOID)
virtual VOID Stop(__in WDF_IO_TARGET_SENT_IO_ACTION Action)
_Must_inspect_result_ NTSTATUS SendSyncRequest(__in FxSyncRequest *Request, __in ULONGLONG Time)
_In_ WDFUSBINTERFACE UsbInterface
Definition: wdfusb.h:2276
uint64_t ULONGLONG
Definition: typedefs.h:67
BOOLEAN HasMismatchedInterfacesInConfigDescriptor(VOID)
_In_ WDFUSBDEVICE _Out_ PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor
Definition: wdfusb.h:1005
USBD_STATUS GetUsbdStatus(VOID)
#define __drv_when(cond, annotes)
Definition: driverspecs.h:334
PUSB_CONFIGURATION_DESCRIPTOR m_ConfigDescriptor
_Must_inspect_result_ NTSTATUS(USB_BUSIFFN * PUSB_BUSIFFN_QUERY_BUS_TIME)(_In_ PVOID, _Out_opt_ PULONG)
Definition: usbbusif.h:33
BOOLEAN m_OnUSBD
ULONG m_HcdPortCapabilities
VOID PipesGotoRemoveState(__in BOOLEAN ForceRemovePipes)
FxUsbDeviceStringContext(__in FX_URB_TYPE FxUrbType)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
static VOID _CleanupPipesRequests(__in PLIST_ENTRY PendHead, __in PSINGLE_LIST_ENTRY SentHead)
PVOID m_BusInterfaceContext
unsigned char UCHAR
Definition: xmlstorage.h:181
FxUsbInterface ** m_Interfaces
LONG USBD_STATUS
Definition: usb.h:165
VOID CleanupInterfacePipesAndDelete(__in FxUsbInterface *UsbInterface)
_Must_inspect_result_ _In_ WDFUSBINTERFACE _In_opt_ PWDF_OBJECT_ATTRIBUTES PipesAttributes
Definition: wdfusb.h:2388
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ ULONG NumberOfIsochPackets
Definition: wdfusb.h:1699
virtual BOOLEAN Dispose(VOID)
BOOLEAN IsEnabled(VOID)
virtual _Must_inspect_result_ NTSTATUS Start(VOID)
_Must_inspect_result_ NTSTATUS InitDevice(__in ULONG USBDClientContractVersionForWdfClient)
VOID RemoveDeletedInterface(__in FxUsbInterface *Interface)
#define __inout
Definition: dbghelp.h:50
Definition: typedefs.h:119
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT PortStatus
Definition: hubbusif.h:40
USBD_PIPE_HANDLE GetControlPipeHandle(VOID)
virtual VOID CopyParameters(__in FxRequestBase *Request)
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ NTSTATUS AllocateDescriptor(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in size_t BufferSize)
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
BOOLEAN m_MismatchedInterfacesInConfigDescriptor
_Must_inspect_result_ __in WDFKEY __in PCUNICODE_STRING __in ULONG __in ULONG __in_ecount(ValueLength) PVOID Value)
_URB_CONTROL_TRANSFER * m_Urb
Definition: fxusbdevice.hpp:86
BOOLEAN OnUSBD(VOID)
FxUsbDevice(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
virtual BOOLEAN Dispose(VOID)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
_Must_inspect_result_ NTSTATUS CyclePort(VOID)
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:361
Definition: usb.h:529
__checkReturn NTSTATUS AllocateUrb(__in USBD_HANDLE USBDHandle)
Definition: fxusbdevice.cpp:66
unsigned short USHORT
Definition: pedump.c:61
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:506
VOID FormatInterfaceSelectSettingUrb(__in PURB Urb, __in USHORT NumEndpoints, __in UCHAR InterfaceNumber, __in UCHAR SettingNumber)
_Must_inspect_result_ NTSTATUS QueryUsbCapability(__in CONST GUID *CapabilityType, __in ULONG CapabilityBufferLength, __drv_when(CapabilityBufferLength==0, __out_opt) __drv_when(CapabilityBufferLength !=0 &&ResultLength==NULL, __out_bcount(CapabilityBufferLength)) __drv_when(CapabilityBufferLength !=0 &&ResultLength !=NULL, __out_bcount_part_opt(CapabilityBufferLength, *ResultLength)) PVOID CapabilityBuffer, __out_opt __drv_when(ResultLength !=NULL, __deref_out_range(<=, CapabilityBufferLength)) PULONG ResultLength)
USBD_HANDLE m_USBDHandle
PUSB_BUSIFFN_QUERY_BUS_TIME m_QueryBusTime
unsigned int * PULONG
Definition: retypes.h:1
#define NULL
Definition: types.h:112
_Must_inspect_result_ NTSTATUS SelectInterfaceByInterface(__in PWDF_OBJECT_ATTRIBUTES PipesAttributes, __in PUSB_INTERFACE_DESCRIPTOR InterfaceDescriptor)
_Must_inspect_result_ NTSTATUS GetInterfaceNumberFromInterface(__in WDFUSBINTERFACE UsbInterface, __out PUCHAR InterfaceNumber)
_URB_CONTROL_TRANSFER m_UrbLegacy
Definition: fxusbdevice.hpp:81
_Must_inspect_result_ NTSTATUS GetString(__in_ecount(*NumCharacters) PUSHORT String, __in PUSHORT NumCharacters, __in UCHAR StringIndex, __in_opt USHORT LangID, __in_opt WDFREQUEST Request=NULL, __in_opt PWDF_REQUEST_SEND_OPTIONS Options=NULL)
_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)
virtual VOID ReleaseAndRestore(__in FxRequestBase *Request)
USBD_CONFIGURATION_HANDLE m_ConfigHandle
unsigned int ULONG
Definition: retypes.h:1
USB_DEVICE_DESCRIPTOR m_DeviceDescriptor
IWudfFile * m_pHostTargetFile
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_Must_inspect_result_ _In_ WDFUSBDEVICE _In_ WDFREQUEST _In_ WDFMEMORY UrbMemory
Definition: wdfusb.h:1572
PUSB_STRING_DESCRIPTOR m_StringDescriptor
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
#define __deref_opt_out_bcount(size)
Definition: ms_sal.h:2812
USBD_VERSION_INFORMATION m_UsbdVersionInformation
UCHAR GetNumInterfaces(VOID)
FxUsbUrb(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USBD_HANDLE USBDHandle, __in_bcount(BufferSize) PVOID Buffer, __in size_t BufferSize)
VOID GetInformation(__out PWDF_USB_DEVICE_INFORMATION Information)
_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
Definition: wdfusb.h:1075
_Must_inspect_result_ NTSTATUS IsConnected(VOID)
__inline VOID CopyDeviceDescriptor(__out PUSB_DEVICE_DESCRIPTOR UsbDeviceDescriptor)
#define __in
Definition: dbghelp.h:35
#define __checkReturn
Definition: ms_sal.h:2873
unsigned short * PUSHORT
Definition: retypes.h:2
#define CONST
Definition: pedump.c:81
static PLARGE_INTEGER Time
Definition: time.c:105
FxWaitLockInternal m_InterfaceIterationLock
_Must_inspect_result_ NTSTATUS Deconfig(VOID)
virtual VOID Dispose(VOID)
Definition: fxusbdevice.cpp:88
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251
UCHAR GetInterfaceNumEndpoints(__in UCHAR InterfaceNumber)
_Releases_lock_(_Global_critical_region_) VOID ReleaseInterfaceIterationLock(VOID)
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes