C# Класс LibUsbDotNet.Main.UsbRegistry

USB device registry members common to both LibUsb and WinUsb devices.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ForceSetupApi bool

Открытые методы

Метод Описание
Open ( UsbDevice &usbDevice ) : bool

Opens the USB device for communucation.

this ( DevicePropertyType devicePropertyType ) : object

Gets a property from the registry. See the DevicePropertyType enumeration for more information.

this ( SPDRP spdrp ) : object

Gets a device property/key from the registry. See the SPDRP enumeration for more information.

this ( string name ) : object

Gets a device property/key from the registry.

Приватные методы

Метод Описание
GetAsGuid ( byte buffer, int len ) : System.Guid
GetAsString ( byte buffer, int len ) : string
GetAsStringArray ( byte buffer, int len ) : string[]
GetAsStringInt32 ( byte buffer, int len ) : Int32

Описание методов

Open() публичный абстрактный Метод

Opens the USB device for communucation.
public abstract Open ( UsbDevice &usbDevice ) : bool
usbDevice UsbDevice The newly created UsbDevice.
Результат bool

this() публичный Метод

Gets a property from the registry. See the DevicePropertyType enumeration for more information.
public this ( DevicePropertyType devicePropertyType ) : object
devicePropertyType DevicePropertyType The name of the property to retrieve.
Результат object

this() публичный Метод

Gets a device property/key from the registry. See the SPDRP enumeration for more information.
public this ( SPDRP spdrp ) : object
spdrp SPDRP The name of the property to retrieve.
Результат object

this() публичный Метод

Gets a device property/key from the registry.
public this ( string name ) : object
name string The name of the property to retrieve.
Результат object

Описание свойств

ForceSetupApi публичное статическое свойство

If true, LibUsbDotNet will use the vid, pid and revision of the UsbDevice.Info descriptor to lookup additional device information in the windows registry via the setupapi. Setting this field to false will cause all device information to come directly from the device descriptors.

If using WinUSB or the LibUsbDotNet-libusb-win32 native driver, information provided by the UsbRegistry class will come from the registry regardless of this setting because these drivers have direct support for this.

The Libusb-1.0 windows-backend driver and the legacy libusb-win32 driver have their own methods for listing, finding, and opening devices. For these drivers, the ForceSetupApi can be set to do a "reverse lookup" via the setupapi using only the vid, pid and revision of the UsbDeviceDescriptor. The UsbRegistry class is then populated with all available SPDRP properties, device interface guids, winusb device paths, etc.

public static bool ForceSetupApi
Результат bool