驱动程序的卸载按钮被禁用 [英] Driver's uninstall button is disabled

查看:432
本文介绍了驱动程序的卸载按钮被禁用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为虚拟设备编写了相当简单的第一个驱动程序.它还有一个.inf文件,我使用 devcon.exe 安装驱动程序.

I've written my fairly simple first driver for a virtual device. It also has a .inf and I install the driver using devcon.exe.

它可以正常安装并正常运行,但我的问题是尝试卸载它时:devcon.exe无法卸载,并且在设备管理器中,该驱动程序的卸载",回滚"和禁用"按钮被禁用.目前,我主要关心的是卸载"按钮.

It install fine and functions properly but my problem is when I try to uninstall it: devcon.exe can't uninstall it and in Device Manager, the Uninstall, Roll Back and Disable buttons for the driver are disabled. My main concern for now is the Uninstall button.

我的驱动程序实现了DriverObject->DriverUnload.我查看了msdn文档,现在找不到驱动程序的DDUninstall INF部分.

My driver implements the DriverObject->DriverUnload. I've look in the msdn docs, and for now I can't find any DDUninstall INF section for drivers.

当我查看%WinDir%\inf\setupapi.app.log时,尝试使用devcon.exe删除它时看到以下错误:

When I look in the %WinDir%\inf\setupapi.app.log I see the following error for when I try to remove it with devcon.exe:

>>>  [DIF_REMOVE - ROOT\HIDCLASS\0000]
>>>  Section start 2012/04/01 20:52:22.237
      cmd: devcon.exe  remove HID\MyDriver
!!!  dvi: Default installer: failed!
!!!  dvi: Error 0xe0000231: The device cannot be disabled.
<<<  Section end 2012/04/01 20:52:22.252
<<<  [Exit status: FAILURE(0xe0000231)]

代码或.inf文件中是否缺少任何内容,以便可以卸载我的驱动程序?

Is there anything I'm missing in the code or in the .inf file so that my driver can be uninstalled ?

推荐答案

我不确定这是与inf相关的问题.错误0xe0000231表示ERROR_NOT_DISABLEABLE.

Im not sure that this is a inf-related problem. Error 0xe0000231 means ERROR_NOT_DISABLEABLE.

在使用时无法卸载.所以问题应该是禁用.

You cannot desinstall while it is being used. So the problem should be the disable.

您是否定义了任何关闭/清除回调?

Do you have defined any close/cleanup callbacks?

这篇关于驱动程序的卸载按钮被禁用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆