RawDevice in device manager

My bus driver presents a PDO for the raw device (RawDeviceOk) with no function driver. Now this raw device appears in device manager under “other devices” because it has no function driver (class). Is there a way to present it under a given class without having a class driver and still using it as a RawDevice. Thank you.

Create an inf that installs a null service entry (not the same as null.sys) anyou can specify the class in the inf.

d

debt from my phone

-----Original Message-----
From: xxxxx@gmail.com
Sent: Saturday, May 21, 2011 12:31 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] RawDevice in device manager

My bus driver presents a PDO for the raw device (RawDeviceOk) with no function driver. Now this raw device appears in device manager under “other devices” because it has no function driver (class). Is there a way to present it under a given class without having a class driver and still using it as a RawDevice. Thank you.


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

Thank you Doron. that did the trick.

Is there any way to prevent user to uninstall this device (inf) from device manager? I need that it should be uninstalled only when my bus driver gets uninstalled.

Not really. You could set not disableable, but once set, it will require a reboot to uninstall either the child dir parent. The parent must be able to function, perhaps in a limited mode if the child is not up and running (and handle the child changing back to running from removed)

d

debt from my phone

-----Original Message-----
From: xxxxx@gmail.com
Sent: Saturday, May 21, 2011 6:35 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] RawDevice in device manager

Thank you Doron. that did the trick.

Is there any way to prevent user to uninstall this device (inf) from device manager? I need that it should be uninstalled only when my bus driver gets uninstalled.


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

I already set not disableable. But with the option along with option available user can uninstall the null inf from the system. Upon reboot child still works because bus driver is still there but the RawDevice goes back under “other devices”. Thank you.

If you don’t want to allow the user to uninstall you can create the RawPDO as hidden one by setting “PNP_DEVICE_DONT_DISPLAY_IN_UI” in “IRP_MN_QUERY_PNP_DEVICE_STATE” this way you don’t have to create a INF and the entry will also be invisible for the user to uninstall.

Unless they select the show hidden devices menu option. The point here is that the driver has to be resilient to state changes in the child.

d

debt from my phone

-----Original Message-----
From: xxxxx@yahoo.com
Sent: Tuesday, May 24, 2011 6:09 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] RawDevice in device manager

If you don’t want to allow the user to uninstall you can create the RawPDO as hidden one by setting “PNP_DEVICE_DONT_DISPLAY_IN_UI” in “IRP_MN_QUERY_PNP_DEVICE_STATE” this way you don’t have to create a INF and the entry will also be invisible for the user to uninstall.


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

>Create an inf that installs a null service entry (not the same as null.sys) anyou can specify the class in the inf.

volsnap.inf is a good sample of null inf


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Thank you. Is there a way to pre-install this null inf? I used DriverPackageInstall and DriverPackagePreInstall - both returned success but when my RawDevice appeared, this inf was not installed. OTOH when I use devmgmt to manually point it to this null inf, it worked as expected.