【问题标题】:I can't get instance of pos printer我无法获取 pos 打印机的实例
【发布时间】:2012-07-15 01:31:17
【问题描述】:

我正在开发 EPOS pos 打印机 (EPOS TM-T88III)。我停止了它的驱动程序、EPOS ADK 和 .NET 的 POS 我可以使用 PrintDocument 功能从我的 pos 打印机打印,但我想使用 EPOS ADK。我尝试了它的“Hello OPOS for .NET”示例,但它不起作用。 因为,

deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, strLogicalName)
m_Printer = posExplorer.CreateInstance(deviceInfo) 

我可以获取 deviceInfo,但是 posExplorer.CreateInstance(deviceInfo) 什么也不返回。我无法解决这个问题。 我该如何解决这个问题才能成功从 posExplorer.CreateInstance(deviceInfo) 返回一些东西,或者是否有使用 EPOS ADK 打印东西的示例代码。

【问题讨论】:

    标签: epson thermal-printer pos-for-.net


    【解决方案1】:

    您必须将其投射到 PosPrinter。这是正确的方法。

    m_Printer = (PosPrinter)posExplorer.CreateInstance(deviceInfo)
    

    对于示例:当您安装 OPOS for .net ADK for EPSON 时,您将获得许多示例应用程序。您可以在安装目录中找到它们。

    还要检查您使用的操作系统版本和 IDE,对于某些操作系统和 IDE,PosPrinter 的对象初始化不会发生。

    【讨论】:

      猜你喜欢
      • 2012-12-16
      • 2014-12-14
      • 1970-01-01
      • 2019-02-11
      • 2020-11-17
      • 1970-01-01
      • 2013-01-26
      • 1970-01-01
      • 2014-11-16
      相关资源
      最近更新 更多