282{
291 WCHAR DeviceNameBuffer[80];
297
298 DPRINT(
"FdcFdoQueryBusRelations() called\n");
299
301
304 &ControllerType,
306 &PeripheralType,
309 FdoDeviceExtension);
312
316 if (Relations ==
NULL)
317 {
319 }
320
322
324 {
326
328 {
329 do
330 {
333 DPRINT(
"Device name: %S\n", DeviceNameBuffer);
334
335
343 }
345
347 {
349 goto done;
350 }
351
352 DPRINT(
"PDO created: %S\n", DeviceNameBuffer);
353
355
358
361
363 PdoDeviceExtension->
DriveInfo = DriveInfo;
364
367 Pdo->Flags &= ~DO_DEVICE_INITIALIZING;
368
369
371 L"FDC\\GENERIC_FLOPPY_DRIVE");
373
374
377 {
378
379
380 break;
381 }
382
383
386 {
387
388
389 break;
390 }
391
392
396 {
397
398
399 break;
400 }
401
402#if 0
403
406 {
407
408
409 break;
410 }
411
412
415 {
416
417
418 break;
419 }
420#endif
421 }
422
425 }
426
427done:
429 {
430 *DeviceRelations = Relations;
431 }
432 else
433 {
434 if (Relations !=
NULL)
436 }
437
439}
#define FILE_DEVICE_SECURE_OPEN
_In_ PCHAR _In_ ULONG DeviceNumber
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
#define ExAllocatePool(type, size)
enum _INTERFACE_TYPE INTERFACE_TYPE
NTSTATUS NTAPI IoQueryDeviceDescription(_In_opt_ PINTERFACE_TYPE BusType, _In_opt_ PULONG BusNumber, _In_opt_ PCONFIGURATION_TYPE ControllerType, _In_opt_ PULONG ControllerNumber, _In_opt_ PCONFIGURATION_TYPE PeripheralType, _In_opt_ PULONG PeripheralNumber, _In_ PIO_QUERY_DEVICE_ROUTINE CalloutRoutine, _In_opt_ PVOID Context)
Reads and returns Hardware information from the appropriate hardware registry key.
#define FILE_DEVICE_MASS_STORAGE
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
#define STATUS_NO_MORE_ENTRIES
NTSTATUS PciCreateInstanceIDString(PUNICODE_STRING InstanceID, PPCI_DEVICE Device)
NTSTATUS PciCreateDeviceDescriptionString(PUNICODE_STRING DeviceDescription, PPCI_DEVICE Device)
NTSTATUS PciCreateCompatibleIDsString(PUNICODE_STRING CompatibleIDs, PPCI_DEVICE Device)
NTSTATUS PciCreateHardwareIDsString(PUNICODE_STRING HardwareIDs, PPCI_DEVICE Device)
NTSTATUS PciCreateDeviceLocationString(PUNICODE_STRING DeviceLocation, PPCI_DEVICE Device)
enum _CONFIGURATION_TYPE CONFIGURATION_TYPE
static NTSTATUS NTAPI FdcFdoConfigCallback(PVOID Context, PUNICODE_STRING PathName, INTERFACE_TYPE BusType, ULONG BusNumber, PKEY_VALUE_FULL_INFORMATION *BusInformation, CONFIGURATION_TYPE ControllerType, ULONG ControllerNumber, PKEY_VALUE_FULL_INFORMATION *ControllerInformation, CONFIGURATION_TYPE PeripheralType, ULONG PeripheralNumber, PKEY_VALUE_FULL_INFORMATION *PeripheralInformation)
PDEVICE_OBJECT DeviceObject
PDEVICE_OBJECT Objects[1]
PDEVICE_OBJECT DeviceObject
COMMON_DEVICE_EXTENSION Common
UNICODE_STRING InstanceId
UNICODE_STRING DeviceDescription
UNICODE_STRING HardwareIds
UNICODE_STRING DeviceLocation
COMMON_DEVICE_EXTENSION Common
UNICODE_STRING CompatibleIds
#define RtlZeroMemory(Destination, Length)
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_INSUFFICIENT_RESOURCES
_Must_inspect_result_ _In_ WDFDEVICE Device
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
WDF_EXTERN_C_START typedef _Must_inspect_result_ _In_ WDFDRIVER _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT _In_opt_ PDEVICE_OBJECT Pdo
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
struct _DEVICE_RELATIONS DEVICE_RELATIONS
#define ObReferenceObject