DriverObject->MajorFunction[IRP_MJ_POWER] = HalpDispatchPower;
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = HalpDispatchWmi;
- /* Create the PDO */
- Status = IoCreateDevice(DriverObject,
- 0,
- NULL,
- FILE_DEVICE_CONTROLLER,
- 0,
- FALSE,
- &TargetDevice);
+ /* Create the PDO and tell the PnP manager about us*/
+ Status = IoReportDetectedDevice(DriverObject,
+ InterfaceTypeUndefined,
+ -1,
+ -1,
+ NULL,
+ NULL,
+ FALSE,
+ &TargetDevice);
if (!NT_SUCCESS(Status))
return Status;
return Status;
}
- /* Tell the PnP manager about us */
- Status = IoReportDetectedDevice(DriverObject,
- InterfaceTypeUndefined,
- -1,
- -1,
- NULL,
- NULL,
- FALSE,
- &TargetDevice);
-
/* Return to kernel */
return Status;
}
DriverObject->MajorFunction[IRP_MJ_POWER] = HalpDispatchPower;
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = HalpDispatchWmi;
- /* Create the PDO */
- Status = IoCreateDevice(DriverObject,
- 0,
- NULL,
- FILE_DEVICE_CONTROLLER,
- 0,
- FALSE,
- &TargetDevice);
+ /* Create the PDO and tell the PnP manager about us*/
+ Status = IoReportDetectedDevice(DriverObject,
+ InterfaceTypeUndefined,
+ -1,
+ -1,
+ NULL,
+ NULL,
+ FALSE,
+ &TargetDevice);
if (!NT_SUCCESS(Status))
return Status;
return Status;
}
- /* Tell the PnP manager about us */
- Status = IoReportDetectedDevice(DriverObject,
- InterfaceTypeUndefined,
- -1,
- -1,
- NULL,
- NULL,
- FALSE,
- &TargetDevice);
-
/* Return to kernel */
return Status;
}