加载/卸载Windows驱动程序 [英] Load/Unload Windows Drivers

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

问题描述

大家好,
是否有用于添加/删除/管理设备驱动程序的.NET Framework工具?
例如,我可以构建一个VB.NET应用程序以列出已加载的驱动程序,还是附加到
的驱动程序 特定设备,然后根据需要加载或卸载这些驱动程序?
你有什么想法?谢谢.

Hello everyone,
Is there a .NET Framework facility for adding/removing/managing device drivers?
For example,can I build a VB.NET application to list loaded drivers, or drivers attached to a
specific device, then load or unload those drivers as needed?
Do you have any ideas? Thanks.

推荐答案

您可以使用Windows Management Instrumentation(WMI)来执行与系统相关的各种活动,这是一个非常复杂的领域,因此开始搜索Google + Microsoft.曾经有一个Visual Studio扩展,可与WMI一起使用(以使其更容易找到要使用的对象名称,但不知道它是否仍然可用(来自Microsoft,因此可能搜索其站点).

关于加载/卸载驱动程序,有一篇关于CodeProject的文章;
TDriver-加载设备驱动程序 [
You can use Windows Management Instrumentation (WMI) to perform various system related activities, it is quite a complex area, so start searching Google + Microsoft. There used to be an extension for Visual Studio for working with WMI (to make it easier to find the object names to use, but don''t know if it is still available (it was from Microsoft, so maybe search their site).

There is an Article on CodeProject on the loading/unloading drivers;
TDriver - Loading Device Drivers[^]


Imports System.IO

Sub GetAllDrives()
        Dim driveArr As DriveInfo() = DriveInfo.GetDrives
        For Each drive As DriveInfo In driveArr
            If drive.IsReady Then
                Console.WriteLine(String.Format("Name:{0} - Drive Type:{1} - Format:{2} - Label:{3} - Total Size:{4}" _
                                                , drive.Name, drive.DriveType, drive.DriveFormat, drive.VolumeLabel, drive.TotalSize))

            End If
        Next


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

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