51 lines
2.1 KiB
C#
51 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.Remoting.Messaging;
|
|
using System.Security.Cryptography;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Xml;
|
|
|
|
namespace TestLSWDevice
|
|
{
|
|
internal class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
// : (Standard port types) : ACPI\VEN_PNP&DEV_0501
|
|
// STM32 Virtual COM Port : Microsoft : USB\VID_0483&PID_5740&REV_0400
|
|
// TWN4/B1.08/NCF4.80/BMKR3.72 : Elatec : USB\VID_09D8&PID_0420&REV_0200
|
|
// Desktop Reader : Thermo Fisher Scientific : USB\VID_0EBB&PID_0340&REV_0101&MI_00
|
|
// Desktop Reader : Lantronix : *cprdevice
|
|
|
|
// YubiKey OTP+FIDO+CCID : Microsoft : USB\VID_1050&PID_0407&REV_0512&MI_02
|
|
// ACR39U ICC Reader : Advanced Card Systems Ltd. : USB\VID_072F&PID_B100&REV_3009
|
|
// Smart Card Reader USB : HID Global : USB\VID_076B&PID_5340&REV_0531
|
|
|
|
LSWDevices.cLSWDevices x = new LSWDevices.cLSWDevices();
|
|
System.Collections.Generic.List<string> filters = new List<string>() { LSWDevices.cLSWDevices.fEdos, LSWDevices.cLSWDevices.fElatec };
|
|
//System.Collections.Generic.List<string> filters = null;
|
|
|
|
x.Scan(0,filters);
|
|
foreach (var d in x.DeviceList)
|
|
{
|
|
System.Diagnostics.Debug.WriteLine($"// {d.BusReportedDeviceDesc} : {d.Device_Manufacturer} : {d.Hardware_ID} ");
|
|
}
|
|
System.Diagnostics.Debug.WriteLine($"cnt={x.DeviceList.Count}");
|
|
|
|
for (int ix = 0; ix < filters.Count; ++ix)
|
|
{
|
|
System.Diagnostics.Debug.WriteLine($"{ix}: filter={filters[ix]} {x.DevicesFound[ix].Device_Manufacturer} {x.DevicesFound[ix].PortName}");
|
|
}
|
|
System.Diagnostics.Debug.WriteLine($"cnt={x.DevicesFound.Count}");
|
|
|
|
string edos , elatec, elatecfirmware;
|
|
int r = LSWDevices.cLSWDevices.GetComPortEdosElatec( out edos, out elatec, out elatecfirmware);
|
|
|
|
|
|
x.Dispose();
|
|
}
|
|
}
|
|
}
|