Hello. So we have a PCI device that supports PNP, so the user will insert/eject the device many times during the running session of the OS.
So I've been testing with root bus toaster, what's recommended for the driver associated with this HWID, to be a functional driver right, or one of the filter drivers in the samples? Due to 3rd party nature of the service which will need to be associated with the INF. Another part of the requirement, will be to completely stop/cleanup the service on device removal. Such that when the device is re-plugged in, the service can start as a fresh, so to do this, I assume the driver also needs to be fully unloaded as well right, for the INF to start the service again on device insertion?
I might be doing something silly, but using the MS driver toaster sample "featured2" functional driver, I never see the IRP_MN_SURPRISE_REMOVAL or the IRP_MN_REMOVE_DEVICE, is it supposed to? Once I use the enum.exe -u commands, the output looks like below. The setup is loading the "dynambus" as the rootbus, then using "featured2" as the device that will be associated with the real HWID.
// enum.exe -p 1234 ... IRP_MN_??? Unknown *** IopQueryLegacyBusInformation - Driver TestBusDrv returned STATUS_SUCCESS for IRP_MN_QUERY_LEGACY_BUS_INFORMATION, and a NULL POINTER. IRP_MN_QUERY_RESOURCE_REQUIREMENTS IRP_MN_FILTER_RESOURCE_REQUIREMENTS IRP_MN_START_DEVICE [!] BusEnum: PDO IRP_MN_START_DEVICE IRP: 0xFFFF9382CB978530 IRP_MN_QUERY_CAPABILITIES //enum.exe -u 1234 [!] BusEnum: Create [!] BusEnum: UnPlug called [!] BusEnum: Plugging out 1234 // No PNP IRP from the functional driver for removal, but the bus driver sees the event
It looks like you're new here. If you want to get involved, click one of these buttons!
|Upcoming OSR Seminars|
|Writing WDF Drivers||21 Oct 2019||OSR Seminar Space & ONLINE|
|Internals & Software Drivers||18 Nov 2019||Dulles, VA|
|Kernel Debugging||30 Mar 2020||OSR Seminar Space|
|Developing Minifilters||27 Apr 2020||OSR Seminar Space & ONLINE|