C# PosExplorer().getDevices找不到我的刻度
我正在尝试与USB电子秤接口,而PosExplorer似乎没有接收到它。当我运行这段代码时,我得到了一堆微软MSR、扫描仪、钥匙锁模拟器,但我的比例没有得到提升。这里有人知道为什么吗 通过打开服务器资源管理器(查看菜单,然后打开服务器资源管理器),可以通过Visual Studio检查已安装的服务对象 进入服务器资源管理器(显示为树)后,展开“服务器”节点,然后展开“计算机名称”节点,然后可以在“LogicalDevice”、“POSDevice”或“ServiceObject”节点中检查特定设备C# PosExplorer().getDevices找不到我的刻度,c#,.net,pos-for-.net,C#,.net,Pos For .net,我正在尝试与USB电子秤接口,而PosExplorer似乎没有接收到它。当我运行这段代码时,我得到了一堆微软MSR、扫描仪、钥匙锁模拟器,但我的比例没有得到提升。这里有人知道为什么吗 通过打开服务器资源管理器(查看菜单,然后打开服务器资源管理器),可以通过Visual Studio检查已安装的服务对象 进入服务器资源管理器(显示为树)后,展开“服务器”节点,然后展开“计算机名称”节点,然后可以在“LogicalDevice”、“POSDevice”或“ServiceObject”节点中检查特定设
我首先从“ServiceObject”节点开始 找出问题所在,我需要一个OPOS驱动程序或一个与电子秤关联的服务对象。由于制造商没有提供一个,我需要创建自己的 基于一些-这里是硬件或安全相关。您是否为您的规模安装了OPOS驱动程序或服务对象?@JAnderson我不确定?我该怎么做?@BurntCandy这取决于你的规模,你可以尝试在制造商网站上查找任何OPOS驱动程序或服务对象。@JAnderson与制造商联系,他们告诉我他们没有任何用于规模的OPOS驱动程序。这是否意味着它和pointOfService不兼容?
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
}
}
}
}