Uninstalling driver

Hello,

Trying programmaticaly uninstall driver I have got following looging in
SetupApi.log

[2003/05/13 10:39:43 1704.288]: @ 10:39:43.061 #I289 Removing device
“ROOT\TDIDRV\0000”.
[2003/05/13 10:39:43 1704.288]: @ 10:39:43.071 #W001 Query-removal during
uninstall of ROOT\TDIDRV\0000 was vetoed by ROOT\TDIDRV\0000 (veto type 1:
PNP_VetoLegacyDevice)
[2003/05/13 10:39:43 1704.288]: @ 10:39:43.071 #W105 Device
“ROOT\TDIDRV\0000” required reboot: Query remove failed (uninstall) CfgMgr32
returned: 0x17: CR_REMOVE_VETOED.

I have found in

Troubleshooting by Using the Setupapi.log File
By Robert Smith
Microsoft Corporation

that

Veto Type 1 (PNP_VetoLegacyDevice)
The vetoer is the device node of the device, which may be the same as the
device being installed. This indicates >that vetoer is a legacy device that
cannot be installed without rebooting.

How CfgMgr32 recognaze that system has to be rebooted and what I have to
change in INF file to avoid this reboot requirements.

Thank you
Leonid