15 // #include <usbprotocoldefs.h>
23 BOOLEAN IsFDO
; // is device a FDO or PDO
24 }COMMON_DEVICE_EXTENSION
, *PCOMMON_DEVICE_EXTENSION
;
28 COMMON_DEVICE_EXTENSION Common
; // shared with PDO
29 PDRIVER_OBJECT DriverObject
; // driver object
30 PDEVICE_OBJECT PhysicalDeviceObject
; // physical device object
31 PDEVICE_OBJECT NextDeviceObject
; // lower device object
32 PUSB_DEVICE_DESCRIPTOR DeviceDescriptor
; // usb device descriptor
33 PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor
; // usb configuration descriptor
34 DEVICE_CAPABILITIES Capabilities
; // device capabilities
35 PUSBD_INTERFACE_LIST_ENTRY InterfaceList
; // interface list
36 ULONG InterfaceListCount
; // interface list count
37 USBD_CONFIGURATION_HANDLE ConfigurationHandle
; // configuration handle
38 USBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface
; // bus custom enumeration interface
39 PUSBC_FUNCTION_DESCRIPTOR FunctionDescriptor
; // usb function descriptor
40 ULONG FunctionDescriptorCount
; // number of function descriptor
41 }FDO_DEVICE_EXTENSION
, *PFDO_DEVICE_EXTENSION
;
43 #define USBCCPG_TAG 'cbsu'
47 COMMON_DEVICE_EXTENSION Common
; // shared with FDO
49 }PDO_DEVICE_EXTENSION
, *PPDO_DEVICE_EXTENSION
;
54 USBCCGP_GetDescriptors(
55 IN PDEVICE_OBJECT DeviceObject
);
58 USBCCGP_SelectConfiguration(
59 IN PDEVICE_OBJECT DeviceObject
,
60 IN PFDO_DEVICE_EXTENSION DeviceExtension
);
64 USBCCGP_GetDescriptor(
65 IN PDEVICE_OBJECT DeviceObject
,
66 IN UCHAR DescriptorType
,
67 IN ULONG DescriptorLength
,
68 IN UCHAR DescriptorIndex
,
70 OUT PVOID
*OutDescriptor
);
76 USBCCGP_SyncForwardIrp(
77 PDEVICE_OBJECT DeviceObject
,
81 USBCCGP_SyncUrbRequest(
82 IN PDEVICE_OBJECT DeviceObject
,
87 IN POOL_TYPE PoolType
,
98 PDEVICE_OBJECT DeviceObject
,
105 PDEVICE_OBJECT DeviceObject
,
111 USBCCGP_QueryInterface(
112 IN PDEVICE_OBJECT DeviceObject
,
113 OUT PUSBC_DEVICE_CONFIGURATION_INTERFACE_V1 BusInterface
);
116 USBCCGP_EnumerateFunctions(
117 IN PDEVICE_OBJECT DeviceObject
);