私はEpson TM-U220Aを持っています。領収書を印刷するために私は書いており、C#デスクトップアプリケーションです。しかし、それはプリンタを見つけることができません。私はメモ帳を経由して(したがって、その作業)Epson Point of Sale Printer - C#
を何かを送信する場合
プリンタのプリント奇妙なキャラクターを持っている私は、以下:.NET用
- POSは
- OPOSN1.11.16をv1.12.exe (エスポンラッパーfor .net)
- エスポンドライバーがインストールされて
- プリンターへのUSBインターフェイス。
コード:
private void FormLoad(object sender, System.EventArgs e)
{
//<<<step1>>>--Start
//Use a Logical Device Name which has been set on the SetupPOS.
string strLogicalName = "PosPrinter";
// string strLogicalName = "ESDPRT001";
try
{
//Create PosExplorer
PosExplorer posExplorer = new PosExplorer();
DeviceInfo deviceInfo = null;
try
{
deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, strLogicalName);
m_Printer = (PosPrinter)posExplorer.CreateInstance(deviceInfo);
}
catch (Exception)
{
ChangeButtonStatus();
return;
}
//Open the device
m_Printer.Open();
//Get the exclusive control right for the opened device.
//Then the device is disable from other application.
m_Printer.Claim(1000);
//Enable the device.
m_Printer.DeviceEnabled = true;
}
catch (PosControlException)
{
ChangeButtonStatus();
}
//<<<step1>>>--End
}
エラー:ポート名が違法である、またはデバイスに接続することができませんでした。 オンライン:m_Printer.Claim(1000);エプソンPOSプリンタは、他の方法でプリンタを使用して、Windowsのプリンタドライバのインストール防止を持って取り組んで私の経験で
あなたは知っています。このリンクを確認してください? – ZombieSheep
エラー:ポート名が不正です、またはデバイスに接続できませんでした。オンライン:m_Printer.Claim(1000); –
drfiverはoposやwindowsドライバを使用していますか? – TutuGeorge