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가 인식하지 못하는 것 같습니다. 이 코드를 실행하면 Microsoft MSR, Scanner, Keylock 시뮬레이터가 많아 지지만 저울은 선택되지 않습니다. 여기 왜 아무도 안다고?PosExplorer(). getDevices가 내 눈금을 찾지 못했습니다.
[기타] (http://stackoverflow.com/questions/11411745/pos-explorer-is-not-finding-any-device-connected-to-the-system-in-c-sharp) - [posts] (http://stackoverflow.com/questions/3481436/opos-posexplorer-getdevice-returns-null-when-executed-in-windows-service) 하드웨어 또는 보안 관련 항목입니다. –
저울에 OPOS 드라이버 또는 서비스 개체가 설치되어 있습니까? –
@JAnderson 잘 모르겠습니다. 이 일을 어떻게 하죠? – BurntCandy