Click here to Skip to main content
15,118,172 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
Hi,

i have a printer epson tm-t81. i am using the below code in c# to print the data.

C#
PosExplorer posExplorer = new PosExplorer();
            DeviceCollection receiptPrinterDevices = posExplorer.GetDevices(DeviceType.PosPrinter);
            DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter, "PosPrinter");
            PosPrinter printer = (PosPrinter)posExplorer.CreateInstance(receiptPrinterDevice);
            printer.Open();
            printer.Claim(10000);
            printer.DeviceEnabled = true;
            printer.PrintNormal(PrinterStation.Receipt, "test print 1\n"); 


But getting error in last line,

printer.PrintNormal(PrinterStation.Receipt, "test print 1\n");

as "microsoft.pointofservice.poscontrolexception:UnicodeDLL:-3000". :( .what is the reason?
How to solve this?

Thanks.
Posted
Updated 6-Aug-14 23:00pm
v2

   
Comments
hasbina 7-Aug-14 5:17am
   
@Richard
sir how to solve my issue..

Thanks..
Richard MacCutchan 7-Aug-14 5:54am
   
You need to trap the execption and see what information is available. Use your debugger to stop in the catch block and examine all the details.
Have you tried this code http://support.microsoft.com/kb/322091[^] instead of using that POS dll from MS?
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900