Tag: pos for .net

不能声称PosPrinter

我有一个TM-T20爱普生,我正在使用此代码尝试打印:“Hello Printer”消息,我一直跟踪PosPrinter的一些特性: public void ImprintHelloPrinter() { //The Explorer PosExplorer explorer = new PosExplorer(); ////Get the device by its type LOGICAL NAME DeviceInfo device = explorer.GetDevice(DeviceType.PosPrinter, “T20PRINTER”); //Create an instance PosPrinter oposPrinter = (PosPrinter)explorer.CreateInstance(device); //Opening MessageBox.Show(@”Statue : ” + oposPrinter.State.ToString()); oposPrinter.Open(); MessageBox.Show(@”Statue : ” + oposPrinter.State.ToString()); //Checking if its really the printer MessageBox.Show(@”Description : ” + […]

OPOS PosExplorer.GetDevice()在Windows服务中执行时返回null

下面的代码片段使用OPOS .NET打开POS打印机进行打印。 它作为独立应用程序的一部分执行时工作正常。 当由Windows服务执行时,对GetDevice(…)的调用始终返回null。 explorer = new PosExplorer(); device_info = explorer.GetDevice(DeviceType.PosPrinter, PrinterName); printer = (PosPrinter)explorer.CreateInstance(device_info); printer.Open(); printer.Claim(1000); printer.DeviceEnabled = true; 打印机恰好是Epson TM-U220B。 在服务访问POS设备之前是否存在需要克服的安全问题? 任何人都可以推荐有关使用OPOS .NET的Windows服务开发的良好信息来源吗?