using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.PointOfService;
using System.Collections;
namespace ScalePOS
{
class ScalePOS
{
static void Main(string[] args)
{
// Create a new instance of PosExplorer and use it to
// collect device information.
PosExplorer explorer = new PosExplorer();
DeviceCollection devices = explorer.GetDevices();
// Search all connected devices for an Scale, print its service object name
foreach (DeviceInfo device in devices)
{
if (device == null)
{
Console.WriteLine("device is null");
}
Console.WriteLine(device.ServiceObjectName);
Console.WriteLine(device.Type);
Console.WriteLine(device.HardwareId);
Console.ReadLine();
// It is important that applications close all open
}
}
}
}
我正在尝试与 USB Scale 连接,但 PosExplorer 似乎没有接上它。当我运行这段代码时,我得到了一堆微软 MSR、扫描仪、钥匙锁模拟器,但我的规模没有被拿起。这里有人知道为什么不吗?