Nefarius.Utilities.DeviceManagement
3.2.184
Prefix Reserved
See the version list below for details.
dotnet add package Nefarius.Utilities.DeviceManagement --version 3.2.184
NuGet\Install-Package Nefarius.Utilities.DeviceManagement -Version 3.2.184
<PackageReference Include="Nefarius.Utilities.DeviceManagement" Version="3.2.184" />
paket add Nefarius.Utilities.DeviceManagement --version 3.2.184
#r "nuget: Nefarius.Utilities.DeviceManagement, 3.2.184"
// Install Nefarius.Utilities.DeviceManagement as a Cake Addin #addin nuget:?package=Nefarius.Utilities.DeviceManagement&version=3.2.184 // Install Nefarius.Utilities.DeviceManagement as a Cake Tool #tool nuget:?package=Nefarius.Utilities.DeviceManagement&version=3.2.184
Nefarius.Utilities.DeviceManagement
Managed wrappers around SetupAPI, Cfgmgr32, NewDev and DrvStore native APIs on Windows.
Examples
Some usage examples of the core library features are presented below.
Enumerate all USB devices
The Devcon
utility class offers helper methods to find devices.
var instance = 0;
// enumerate all devices that export the GUID_DEVINTERFACE_USB_DEVICE interface
while (Devcon.FindByInterfaceGuid(DeviceInterfaceIds.UsbDevice, out var path,
out var instanceId, instance++))
{
Console.WriteLine($"Path: {path}, InstanceId: {instanceId}");
var usbDevice = PnPDevice
.GetDeviceByInterfaceId(path)
.ToUsbPnPDevice();
Console.WriteLine($"Got USB device {usbDevice.InstanceId}");
}
Listen for new and removed USB devices
One or more instances of the DeviceNotificationListener
can be used to listen for plugin and unplug events of various devices. This class has no dependency on WinForms or WPF and works in Console Applications and Windows Services alike.
var listener = new DeviceNotificationListener();
listener.DeviceArrived += Console.WriteLine;
listener.DeviceRemoved += Console.WriteLine;
// start listening for plugins or unplugs of GUID_DEVINTERFACE_USB_DEVICE interface devices
listener.StartListen(DeviceInterfaceIds.UsbDevice);
Get all driver packages in the Driver Store
var allDriverPackages = DriverStore.ExistingDrivers.ToList();
Remove all copies of mydriver.inf
from the Driver Store
foreach (var driverPackage in allDriverPackages.Where(p => p.Contains("mydriver.inf", StringComparison.OrdinalIgnoreCase)))
{
DriverStore.RemoveDriver(driverPackage);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Nefarius.Utilities.DeviceManagement:
Package | Downloads |
---|---|
Nefarius.Drivers.HidHide
Managed API for configuring HidHide. |
|
Wujek_Dualsense_API
Wujek Dualsense API is a .NET library designed to interface with the PlayStation DualSense controller, providing functionalities to control its various features such as haptic feedback, LEDs, triggers, and more. |
|
Nefarius.Utilities.Bluetooth
Utility library for unconventional Bluetooth tasks on Windows. |
|
O.Usb
Package Description |
GitHub repositories (6)
Showing the top 5 popular GitHub repositories that depend on Nefarius.Utilities.DeviceManagement:
Repository | Stars |
---|---|
Valkirie/HandheldCompanion
ControllerService
|
|
CircumSpector/DS4Windows
A reimagination of DS4Windows.
|
|
project-sbc/Handheld-Control-Panel
|
|
nefarius/Legacinator
The one and only Legacinator
|
|
Struggleton/Delfinovin
An XInput solution for Gamecube Controllers
|
Version | Downloads | Last updated |
---|---|---|
5.0.0 | 538 | 11/9/2024 |
5.0.0-pre001 | 69 | 11/9/2024 |
4.0.3 | 114 | 11/7/2024 |
4.0.3-pre001 | 65 | 11/7/2024 |
4.0.2 | 162 | 10/30/2024 |
4.0.1 | 566 | 10/1/2024 |
4.0.0 | 682 | 9/20/2024 |
4.0.0-pre002 | 68 | 9/20/2024 |
4.0.0-pre001 | 79 | 9/20/2024 |
3.23.0 | 563 | 8/17/2024 |
3.22.0 | 1,145 | 7/7/2024 |
3.21.0 | 132 | 7/4/2024 |
3.20.0 | 116 | 7/4/2024 |
3.19.0 | 267 | 6/30/2024 |
3.19.0-pre3 | 111 | 6/28/2024 |
3.19.0-pre2 | 97 | 6/27/2024 |
3.18.1 | 1,495 | 3/11/2024 |
3.17.406 | 2,345 | 8/29/2023 |
3.17.403 | 297 | 8/27/2023 |
3.17.401-pre | 138 | 8/26/2023 |
3.16.384-pre | 174 | 8/23/2023 |
3.14.305 | 2,376 | 5/14/2023 |
3.13.303-pre | 149 | 5/14/2023 |
3.12.297-pre | 214 | 5/13/2023 |
3.11.295-pre | 178 | 5/12/2023 |
3.10.293-pre | 226 | 5/9/2023 |
3.9.255 | 1,714 | 4/9/2023 |
3.8.228 | 1,221 | 2/2/2023 |
3.8.225-pre | 187 | 2/1/2023 |
3.6.213 | 659 | 1/12/2023 |
3.6.211 | 321 | 1/12/2023 |
3.5.209 | 533 | 12/26/2022 |
3.4.206 | 403 | 12/20/2022 |
3.4.204-pre | 168 | 12/19/2022 |
3.4.202-pre | 155 | 12/19/2022 |
3.3.196 | 689 | 10/16/2022 |
3.2.193 | 413 | 10/16/2022 |
3.2.191 | 411 | 10/16/2022 |
3.2.189 | 430 | 10/16/2022 |
3.2.186 | 420 | 10/16/2022 |
3.2.184 | 687 | 9/29/2022 |
3.2.175 | 510 | 9/12/2022 |
3.1.173 | 411 | 9/12/2022 |
3.1.171 | 418 | 9/12/2022 |
3.0.168 | 437 | 9/10/2022 |
3.0.165-pre | 244 | 9/9/2022 |
2.9.116 | 489 | 8/25/2022 |
2.8.110 | 900 | 7/19/2022 |
2.8.107 | 722 | 6/15/2022 |
2.7.104 | 449 | 6/14/2022 |
2.6.102 | 609 | 6/2/2022 |
2.6.100 | 481 | 5/26/2022 |
2.6.98 | 502 | 5/24/2022 |
2.4.94 | 493 | 5/19/2022 |
2.4.91 | 491 | 5/14/2022 |
2.4.89 | 427 | 5/14/2022 |
2.3.87 | 455 | 5/13/2022 |
2.2.85 | 480 | 5/11/2022 |
2.1.76 | 447 | 5/11/2022 |
2.1.74 | 458 | 5/10/2022 |
2.0.71 | 473 | 5/10/2022 |
2.0.68 | 491 | 5/8/2022 |
2.0.66 | 453 | 5/8/2022 |
2.0.60 | 457 | 5/8/2022 |
1.6.50 | 487 | 5/6/2022 |
1.6.48-beta | 195 | 5/6/2022 |
1.4.42-beta | 949 | 2/1/2022 |
1.3.28-beta | 211 | 1/30/2022 |
1.2.24-beta | 194 | 1/30/2022 |
1.2.22-beta | 190 | 1/30/2022 |
1.1.20-beta | 199 | 1/30/2022 |
1.0.18-beta | 203 | 1/30/2022 |
1.0.15-beta | 358 | 1/17/2022 |
1.0.13-beta | 201 | 1/17/2022 |
1.0.11-beta | 200 | 1/17/2022 |
1.0.6-beta | 207 | 1/16/2022 |
1.0.4-beta | 211 | 1/16/2022 |
1.0.2-beta | 212 | 1/16/2022 |