244{
249 ULONG FieldLengthVendor, FieldLengthProduct, FieldLengthRevision,
TotalLength, FieldLengthSerialNumber;
258
259 DPRINT(
"USBSTOR_HandleQueryProperty\n");
260
261
262
263
265
266
267
268
271
272
273
274
276
277
278
279
282 {
283
284
285
287 }
288
289
290
291
293 {
294
295
296
298 }
299
301 {
302
303
304
306 }
307
308
309
310
312 {
314
315
316
317
319 ASSERT(PDODeviceExtension);
321
322
323
324
326 ASSERT(FDODeviceExtension);
328
329
330
331
334
335
336
337
341
342
343
344
345 if (FDODeviceExtension->SerialNumber)
346 {
347
348
349
350 FieldLengthSerialNumber =
wcslen(FDODeviceExtension->SerialNumber->bString);
351 }
352 else
353 {
354
355
356
357 FieldLengthSerialNumber = 0;
358 }
359
360
361
362
363
365
366
367
368
370 {
371
372
373
376
377
378
379
382
385 }
386
387
388
389
391
392
393
394
406 DeviceDescriptor->RawPropertiesLength = FieldLengthVendor + FieldLengthProduct + FieldLengthRevision + FieldLengthSerialNumber + 3 + (FieldLengthSerialNumber > 0 ? + 1 : 0);
407
408
409
410
412
413
414
415
417 Buffer[FieldLengthVendor] =
'\0';
418 Buffer += FieldLengthVendor + 1;
419
420
421
422
424 Buffer[FieldLengthProduct] =
'\0';
425 Buffer += FieldLengthProduct + 1;
426
427
428
429
431 Buffer[FieldLengthRevision] =
'\0';
432 Buffer += FieldLengthRevision + 1;
433
434
435
436
437 if (FieldLengthSerialNumber)
438 {
439
440
441
443
444
445
446
450
451
452
453
456 }
457
458
463
464
465
466
469 }
470 else
471 {
472
473
474
476
478 {
479
480
481
484
485
486
487
490
493 }
494
495
496
497
499
500
501
502
505 AdapterDescriptor->MaximumTransferLength =
MAXULONG;
506 AdapterDescriptor->MaximumPhysicalPages = 25;
507 AdapterDescriptor->AlignmentMask = 0;
508 AdapterDescriptor->AdapterUsesPio =
FALSE;
509 AdapterDescriptor->AdapterScansDown =
FALSE;
510 AdapterDescriptor->CommandQueueing =
FALSE;
511 AdapterDescriptor->AcceleratedTransfer =
FALSE;
513 AdapterDescriptor->BusMajorVersion = 0x2;
514 AdapterDescriptor->BusMinorVersion = 0x00;
515
516
517
518
520
521
522
523
525 }
526}
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
* PSTORAGE_DESCRIPTOR_HEADER
STORAGE_DESCRIPTOR_HEADER
STORAGE_ADAPTER_DESCRIPTOR
* PSTORAGE_DEVICE_DESCRIPTOR
struct _STORAGE_PROPERTY_QUERY * PSTORAGE_PROPERTY_QUERY
STORAGE_DEVICE_DESCRIPTOR
* PSTORAGE_ADAPTER_DESCRIPTOR
#define STATUS_INVALID_PARAMETER_2
#define STATUS_INVALID_PARAMETER_1
const KSDEVICE_DESCRIPTOR DeviceDescriptor
COMMON_DEVICE_EXTENSION Common
STORAGE_QUERY_TYPE QueryType
STORAGE_PROPERTY_ID PropertyId
struct UFI_INQUIRY_RESPONSE * PUFI_INQUIRY_RESPONSE