Re: Printing in Windows CE
Joseph M. Newcomer a ?mis l'id?e suivante :
My envelope feeder doesn't work. What should I do?
I thought the Windows API for printing (StartDoc(), EndDoc() and so on)
was usable for all compatible printers. When looking at the Internet I
find lot of pages about this API (for example :
http://www.dreamincode.net/forums/showtopic4531.htm)
FYI, I get a user manual from Axiohm society, called "Compact Board
for MCTP/MHTP printer mechanisms". In fact you can find it for download
at the following page :
http://www.axiohm.com/upload_img/gamme/3107770%20Z%20COMPACT%20BOARD%20for%20MCTP%20&%20MHTP%20User%20manual%20_m65.pdf
The printer is a continuous printer built in a selling terminal which
runs on Windows CE. Few information available ...
I tried to access directly to LPT1 port to send some control characters
as specified in the document I have, but nothing happens. Is it
possible to access LPT1 port in Windows CE ?
The code I used :
unsigned char msgPrinter[3];
HANDLE hCom;
hCom = CreateFile(_T("LPT1"),GENERIC_READ |
GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
DWORD dw;
msgPrinter[0] = 0x0e;
msgPrinter[1] = 0xFF;
msgPrinter[2] = 0x00;
BOOL b = WriteFile(hCom, msgPrinter, 2, &dw, NULL);
if (!b)
{
// Rat?
b = false;
}
CloseHandle(hCom);
Thank you.