Problem With Registering PNP notification for GUID_DEVCLASS_NETTRANS

Hii All…

I am facing some problem on registering PNP notification for GUID_DEVCLASS_NETTRANS. I registered the notification but I am not receiving any notification ie the callback routine is not getting called. I am expecting the callback routine gets called when \Device\tcp gets loaded. Following code shows how I register the notification.

status = IoRegisterPlugPlayNotification (
EventCategoryDeviceInterfaceChange,
PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES,
(PVOID)&GUID_DEVCLASS_NETTRANS,
DriverObject,
(PDRIVER_NOTIFICATION_CALLBACK_ROUTINE)
CallBack_PnpNotifyInterfaceChange,
(PVOID)deviceData,
&deviceData->NotificationHandle);

if (!NT_SUCCESS(status)) {
DbgPrint(“RegisterPnPNotifiction failed: %x\n”, status);
return status;
}

Can anybody help to resolve this issue.

Thanks
Biju CP

You using a device class guid. IoRegisterPlugPlayNotification works with device interface guids. Furthermore, device interfaces require pnp stacks. The tcp driver is not a pnp driver, so I don’t think there is a device interface guid that will tell you when networking components (outside of NICs themselves) are loaded.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@globaledgesoft.com
Sent: Wednesday, October 15, 2008 5:21 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Problem With Registering PNP notification for GUID_DEVCLASS_NETTRANS

Hii All…

I am facing some problem on registering PNP notification for GUID_DEVCLASS_NETTRANS. I registered the notification but I am not receiving any notification ie the callback routine is not getting called. I am expecting the callback routine gets called when \Device\tcp gets loaded. Following code shows how I register the notification.

status = IoRegisterPlugPlayNotification (
EventCategoryDeviceInterfaceChange,
PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES,
(PVOID)&GUID_DEVCLASS_NETTRANS,
DriverObject,
(PDRIVER_NOTIFICATION_CALLBACK_ROUTINE)
CallBack_PnpNotifyInterfaceChange,
(PVOID)deviceData,
&deviceData->NotificationHandle);

if (!NT_SUCCESS(status)) {
DbgPrint(“RegisterPnPNotifiction failed: %x\n”, status);
return status;
}

Can anybody help to resolve this issue.

Thanks
Biju CP


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Register with TDI if you want to know when \Device\TCP becomes available as
a network ‘transport’.

TdiRegisterPnPHandlers() is the routine you should look at.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Thursday, October 16, 2008 1:17 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Problem With Registering PNP notification for
GUID_DEVCLASS_NETTRANS

You using a device class guid. IoRegisterPlugPlayNotification works with
device interface guids. Furthermore, device interfaces require pnp stacks.
The tcp driver is not a pnp driver, so I don’t think there is a device
interface guid that will tell you when networking components (outside of
NICs themselves) are loaded.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@globaledgesoft.com
Sent: Wednesday, October 15, 2008 5:21 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Problem With Registering PNP notification for
GUID_DEVCLASS_NETTRANS

Hii All…

I am facing some problem on registering PNP notification for
GUID_DEVCLASS_NETTRANS. I registered the notification but I am not receiving
any notification ie the callback routine is not getting called. I am
expecting the callback routine gets called when \Device\tcp gets loaded.
Following code shows how I register the notification.

status = IoRegisterPlugPlayNotification (
EventCategoryDeviceInterfaceChange,
PNPNOTIFY_DEVICE_INTERFACE_INCLUDE_EXISTING_INTERFACES,
(PVOID)&GUID_DEVCLASS_NETTRANS,
DriverObject,
(PDRIVER_NOTIFICATION_CALLBACK_ROUTINE)
CallBack_PnpNotifyInterfaceChange,
(PVOID)deviceData,
&deviceData->NotificationHandle);

if (!NT_SUCCESS(status)) {
DbgPrint(“RegisterPnPNotifiction failed: %x\n”, status);
return status;
}

Can anybody help to resolve this issue.

Thanks
Biju CP


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer