Query-Removal request at the end of device installation

We have a dynamic bus enumerator, the MSI installs bus driver using setupDi APIs and using DIFx MsiProcessDrivers action performs copy-only installation of PDO’s function driver.

After reboot, when PDO is enumerated by bus driver, function driver gets loaded as expected but it prompts for reboot with following entry in setupApi.log entry:
#I123 Doing full install of “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002”.
#W100 Query-removal during install of “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002” was vetoed by “{8AB40982-15A5-40d8-A876-2585C8C8057C}\TESTCS\1&2d12bed1&13&0000002” (veto type 6: PNP_VetoDevice).
#W104 Device “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002” required reboot: Query remove failed (install) CfgMgr32 returned: 0x17: CR_REMOVE_VETOED.
#I121 Device install of “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002” finished successfully.

System prompts for reboot and next time (after reboot) when bus driver enumerates PDO with same serial number it does not prompt for any reboot. Why do we receiving Query - Removal request during FDO installation for 1st time?

Thanks,
Pratima

This is a normal install pattern. A better question would be why are you
rejecting the query remove? if you have no good reason to reject the remove
request (a good reason would be boot disk, paging path, etc.) then you
should allow pnp to do its thing.

On Mon, Mar 17, 2008 at 9:08 AM, wrote:

> We have a dynamic bus enumerator, the MSI installs bus driver using
> setupDi APIs and using DIFx MsiProcessDrivers action performs copy-only
> installation of PDO’s function driver.
>
> After reboot, when PDO is enumerated by bus driver, function driver gets
> loaded as expected but it prompts for reboot with following entry in
> setupApi.log entry:
> #I123 Doing full install of
> “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002”.
> #W100 Query-removal during install of
> “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002” was
> vetoed by
> “{8AB40982-15A5-40d8-A876-2585C8C8057C}\TESTCS\1&2d12bed1&13&0000002” (veto
> type 6: PNP_VetoDevice).
> #W104 Device
> “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002”
> required reboot: Query remove failed (install) CfgMgr32 returned: 0x17:
> CR_REMOVE_VETOED.
> #I121 Device install of
> “{8AB40982-15A5-40D8-A876-2585C8C8057C}\TESTCS\1&2D12BED1&13&0000002”
> finished successfully.
>
> System prompts for reboot and next time (after reboot) when bus driver
> enumerates PDO with same serial number it does not prompt for any reboot.
> Why do we receiving Query - Removal request during FDO installation for 1st
> time?
>
> Thanks,
> Pratima
>
> —
> 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
>


Mark Roddy

Hi Mark,

So Pnp_Veto is expected as per your comments. My problem is:

PDO enumerated by bus driver is getting used by a 3rd driver say my file system before the device install completes. Below is logic that I have right now in file sys driver to make sure that we use PDO only when it’s installation is completed:

  • In a time-constrained while loop try to create file object for FDO
  • Once file object is created successfully, Check PnPState of a device by accessing enumerator DEVICE_PNP_STATE stored in device extention
  • Go ahead and use the device only if PnPState == started. IRP_MN_START_DEVICE from FDO’s driver set Started to TRUE.

For 1st time install of FDO this logic fails…Is there any standard method available to perform such kind of synchronization…can IoRegisterPlugPlayNotification will help in this case?

Thanks,
Pratima

Ugh. A timed loop and manually checking state is not good.

Yes. Use IoRegisterPlugPlayNotification to be told about when you can open the FDO (it will once it has started and enabled the interface). Toastmon in the wdk shows you how to use this api.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Monday, March 17, 2008 1:06 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Query-Removal request at the end of device installation

Hi Mark,

So Pnp_Veto is expected as per your comments. My problem is:

PDO enumerated by bus driver is getting used by a 3rd driver say my file system before the device install completes. Below is logic that I have right now in file sys driver to make sure that we use PDO only when it’s installation is completed:

  • In a time-constrained while loop try to create file object for FDO
  • Once file object is created successfully, Check PnPState of a device by accessing enumerator DEVICE_PNP_STATE stored in device extention
  • Go ahead and use the device only if PnPState == started. IRP_MN_START_DEVICE from FDO’s driver set Started to TRUE.

For 1st time install of FDO this logic fails…Is there any standard method available to perform such kind of synchronization…can IoRegisterPlugPlayNotification will help in this case?

Thanks,
Pratima


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