1 /*++
2
3 Copyright (c) Microsoft Corporation
4
5 Module Name:
6
7 UsbStubUm.cpp
8
9 Abstract:
10
11 Author:
12
13 Environment:
14
15
16 Revision History:
17
18 --*/
19
20 extern "C" {
21 #define INITGUID
22 #include <initguid.h>
23
24 // {B1A96A13-3DE0-4574-9B01-C08FEAB318D6}
25 DEFINE_GUID(USB_BUS_INTERFACE_USBDI_GUID,
26 0xb1a96a13, 0x3de0, 0x4574, 0x9b, 0x1, 0xc0, 0x8f, 0xea, 0xb3, 0x18, 0xd6);
27
28 }
29
30 #include "fxusbpch.hpp"
31
32 VOID
USBD_UrbFree(_In_ USBD_HANDLE USBDHandle,_In_ PURB Urb)33 USBD_UrbFree(
34 _In_ USBD_HANDLE USBDHandle,
35 _In_ PURB Urb
36 )
37 {
38 UNREFERENCED_PARAMETER(USBDHandle);
39 UNREFERENCED_PARAMETER(Urb);
40
41 ASSERTMSG("Not implemented for UMDF\n", FALSE);
42 }
43
44
45 NTSTATUS
USBD_UrbAllocate(_In_ USBD_HANDLE USBDHandle,_Outptr_result_bytebuffer_ (sizeof (URB))PURB * Urb)46 USBD_UrbAllocate(
47 _In_ USBD_HANDLE USBDHandle,
48 _Outptr_result_bytebuffer_(sizeof(URB)) PURB *Urb
49 )
50 {
51 UNREFERENCED_PARAMETER(USBDHandle);
52 UNREFERENCED_PARAMETER(Urb);
53
54 ASSERTMSG("Not implemented for UMDF\n", FALSE);
55
56 return STATUS_SUCCESS;
57 }
58
59 NTSTATUS
60 USBD_IsochUrbAllocate(
61 _In_ USBD_HANDLE USBDHandle,
62 _In_ ULONG NumberOfIsochPacket,
63 _Outptr_result_bytebuffer_(sizeof(struct _URB_ISOCH_TRANSFER)
64 + (NumberOfIsochPackets * sizeof(USBD_ISO_PACKET_DESCRIPTOR))
65 - sizeof(USBD_ISO_PACKET_DESCRIPTOR))
66 PURB *Urb
67 )
68 {
69 UNREFERENCED_PARAMETER(USBDHandle);
70 UNREFERENCED_PARAMETER(NumberOfIsochPacket);
71 UNREFERENCED_PARAMETER(Urb);
72
73 ASSERTMSG("Not implemented for UMDF\n", FALSE);
74
75 return STATUS_SUCCESS;
76 }
77
78
79 VOID
USBD_CloseHandle(_In_ USBD_HANDLE USBDHandle)80 USBD_CloseHandle(
81 _In_ USBD_HANDLE USBDHandle
82 )
83 {
84 UNREFERENCED_PARAMETER(USBDHandle);
85
86 ASSERTMSG("Not implemented for UMDF\n", FALSE);
87 }
88
89 NTSTATUS
USBD_CreateHandle(_In_ PDEVICE_OBJECT DeviceObject,_In_ PDEVICE_OBJECT TargetDeviceObject,_In_ ULONG USBDClientContractVersion,_In_ ULONG PoolTag,_Out_ USBD_HANDLE * USBDHandle)90 USBD_CreateHandle(
91 _In_ PDEVICE_OBJECT DeviceObject,
92 _In_ PDEVICE_OBJECT TargetDeviceObject,
93 _In_ ULONG USBDClientContractVersion,
94 _In_ ULONG PoolTag,
95 _Out_ USBD_HANDLE *USBDHandle
96 )
97 {
98 UNREFERENCED_PARAMETER(DeviceObject);
99 UNREFERENCED_PARAMETER(TargetDeviceObject);
100 UNREFERENCED_PARAMETER(USBDClientContractVersion);
101 UNREFERENCED_PARAMETER(PoolTag);
102 UNREFERENCED_PARAMETER(USBDHandle);
103
104 ASSERTMSG("Not implemented for UMDF\n", FALSE);
105
106 return STATUS_SUCCESS;
107
108 }
109
110 NTSTATUS
111 USBD_QueryUsbCapability(
112 _In_ USBD_HANDLE USBDHandle,
113 _In_ const GUID* CapabilityType,
114 _In_ ULONG OutputBufferLength,
115 _When_(OutputBufferLength == 0, _Pre_null_)
116 _When_(OutputBufferLength != 0 && ResultLength == NULL, _Out_writes_bytes_(OutputBufferLength))
117 _When_(OutputBufferLength != 0 && ResultLength != NULL, _Out_writes_bytes_to_opt_(OutputBufferLength, *ResultLength))
118 PUCHAR OutputBuffer,
119 _Out_opt_
120 _When_(ResultLength != NULL, _Deref_out_range_(<=,OutputBufferLength))
121 PULONG ResultLength
122 )
123 {
124 UNREFERENCED_PARAMETER(USBDHandle);
125 UNREFERENCED_PARAMETER(CapabilityType);
126 UNREFERENCED_PARAMETER(OutputBufferLength);
127 UNREFERENCED_PARAMETER(OutputBuffer);
128 UNREFERENCED_PARAMETER(ResultLength);
129
130 ASSERTMSG("Not implemented for UMDF\n", FALSE);
131
132 return STATUS_SUCCESS;
133 }
134
135 VOID
USBD_AssignUrbToIoStackLocation(_In_ USBD_HANDLE USBDHandle,_In_ PIO_STACK_LOCATION IoStackLocation,_In_ PURB Urb)136 USBD_AssignUrbToIoStackLocation(
137 _In_ USBD_HANDLE USBDHandle,
138 _In_ PIO_STACK_LOCATION IoStackLocation,
139 _In_ PURB Urb
140 )
141 {
142 UNREFERENCED_PARAMETER(USBDHandle);
143 UNREFERENCED_PARAMETER(IoStackLocation);
144 UNREFERENCED_PARAMETER(Urb);
145
146 ASSERTMSG("Not implemented for UMDF\n", FALSE);
147 }
148