LibUsbDotNet 2.2.8
Parse Method (identifiers)
Library Reference ► LibUsbDotNet.Main ► UsbSymbolicName ► Parse(String)
|
Parses registry strings containing USB information. This function can Parse symbolic names as well as hardware ids, compatible ids, etc.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static UsbSymbolicName Parse( string identifiers )
Public Shared Function Parse ( _ identifiers As String _ ) As UsbSymbolicName
public: static UsbSymbolicName^ Parse( String^ identifiers )
Parameters
- identifiers (String)
-
[Missing <param name="identifiers"/> documentation for "M:LibUsbDotNet.Main.UsbSymbolicName.Parse(System.String)"]
Return Value
A UsbSymbolicName class with all the available information from the identifiers string.
Remarks
CopyC#
List<UsbRegistryDeviceInfo> regDeviceList = UsbGlobals.RegFindDevices(); foreach (UsbRegistryDeviceInfo regDevice in mDevList) { string[] hardwareIds = (string[])regDevice.Properties[DevicePropertyType.HardwareID]; UsbSymbolicName usbHardwareID = UsbSymbolicName.Parse(hardwareIds[0]); Debug.Print(string.Format("Vid:0x{0:X4} Pid:0x{1:X4}", usbHardwareID.Vid, usbHardwareID.Pid)); }