1

I am using DiUninstallDriver for uninstalling a driver.

The syntax is:

BOOL DiUninstallDriverW(
  HWND    hwndParent,
  LPCWSTR InfPath,
  DWORD   Flags,
  PBOOL   NeedReboot
);

The NeedRebbot parameter is explained:

A pointer to a value of type BOOL that DiUninstallDriver sets to indicate whether a system restart is required to complete the uninstallation. 

But in my case, the returned value is False (=Reboot is not needed), but in setupapi.dev.log I see that reboot IS required!!

!    dvi:  Query-removal during install of 'PCI\VEN_8086&DEV_XXXX&SUBSYS_YYYYYYYY&REV_11\1&11111111&1&B0' was vetoed by 'PCI\VEN_8086&DEV_XXXX&SUBSYS_YYYYYYYY&REV_11\1&11111111&1&B0???' (veto type 5: PNP_VetoOutstandingOpen).
!    dvi:  Device required reboot: Query remove failed (install) 0x17: CR_REMOVE_VETOED.

I am OK with the reboot that is required (maybe a handle to this driver is opened), by why the API returns false and i have no indication that reboot is required??

RK Coder
  • 398
  • 2
  • 14
  • Because Windows... :) Jokes aside, i don't know the answer to your question but they are pretty inconsistent with whatever new things they introduce. It might be a bug on MS side. Even the doc page you linked is wrong copy/paste of `DIInstallDriverW` function. – Nenad May 05 '20 at 14:14

0 Answers0