Hi,
I am having problems with custom Pnp notification between two drivers.
I have two drivers A and B. Driver A gets device object of Driver B using IoGetDeviceObjectPointer( )
and then uses the device object to send Ioctls to Driver B.
Driver A, registers for Pnp notification on the FileObject obtained by IoGetDeviceObjectPointer( )
and notification type is EventCategoryTargetDeviceChange
IoRegisterPlugPlayNotification(
EventCategoryTargetDeviceChange,
0,
TargetDeviceFileObject, // of Driver B
DriverObject, // of Driver A
CustomNotificationCallback,
pvContext,
&RegistrationHandle
);
while, Driver B uses IoReportTargetDeviceChange( ) to notify the custom pnp event
TARGET_DEVICE_CUSTOM_NOTIFICATION notification;
IoReportTargetDeviceChange(
Pdo, // Pdo of Driver B
¬ification
);
Both the functions return STATUS_SUCCESS, but at the end my CustomNotificationCallback
is NOT executed.
I donot understand what is the problem. Can anyone throw somelight over this.
Thanks in advance,
- Jay