104{
108
109
110
111
113
114
115
116
119 {
120
121
122
123 DeviceExtension->DeviceDescriptor =
NULL;
125 }
126
127
128
129
132 {
133
134
135
136 FreeItem(DeviceExtension->DeviceDescriptor);
137 DeviceExtension->DeviceDescriptor =
NULL;
139 }
140
141
142
143
144 DescriptorLength = DeviceExtension->ConfigurationDescriptor->wTotalLength;
145
146
147
148
149 FreeItem(DeviceExtension->ConfigurationDescriptor);
150 DeviceExtension->ConfigurationDescriptor =
NULL;
151
152
153
154
157 {
158
159
160
161 FreeItem(DeviceExtension->DeviceDescriptor);
162 DeviceExtension->DeviceDescriptor =
NULL;
164 }
165
166
167
168
169 if (DeviceExtension->DeviceDescriptor->iSerialNumber)
170 {
171
172
173
176 {
177
178
179
180 FreeItem(DeviceExtension->DeviceDescriptor);
181 DeviceExtension->DeviceDescriptor =
NULL;
182
183
184
185
186 FreeItem(DeviceExtension->ConfigurationDescriptor);
187 DeviceExtension->ConfigurationDescriptor =
NULL;
188
189
190
191
192 DeviceExtension->SerialNumber =
NULL;
194 }
195 }
196
198}
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
NTSTATUS NTAPI USBSTOR_GetDescriptor(IN PDEVICE_OBJECT DeviceObject, IN UCHAR DescriptorType, IN ULONG DescriptorLength, IN UCHAR DescriptorIndex, IN LANGID LanguageId, OUT PVOID *OutDescriptor)
#define USB_CONFIGURATION_DESCRIPTOR_TYPE
#define USB_DEVICE_DESCRIPTOR_TYPE
#define USB_STRING_DESCRIPTOR_TYPE