我正在使用DiUninstallDriver卸载驱动程序。
语法是:
BOOL DiUninstallDriverW(
HWND hwndParent,
LPCWSTR InfPath,
DWORD Flags,
PBOOL NeedReboot
);
NeedRebbot
参数说明:
A pointer to a value of type BOOL that DiUninstallDriver sets to indicate whether a system restart is required to complete the uninstallation.
但在我的情况下,返回值为False(不需要重新启动),但在 setupapi.dev.log 中我看到需要重新启动!
! 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.
我对所需的重新启动没问题(可能打开了此驱动程序的句柄),为什么 API 返回 false 并且我没有指示需要重新启动?