Title
Rev.
Page
HPP-240
Ver1.0
P.53
7.
USB (User Interface)
Without using the Windows driver, you are able to check the printer status, and transmit /
receive the data, by using USB Interface DLL (HwaUSB.DLL) and OCX driver (HwaUSB.OCX).
7-1)
DLL Interface
Place the HwaUSB.DLL into the System32 folder or SysWow64 folder depending on your
Operating System
’
s bit version.
1)long UsbOpen(LPCTSTR SelPrinter);
Open the USB port to Printer Model “HPP-250”.
Parameters:
SelPrinter : Printer Model Name
Return :
Open Normal
: 0
Open Error
: -3(
negative
)
2)long PrintStr(LPCTSTR data);
Prints String
.
Parameters:
data : String datas
Return :
Print Normal
: 1
Print Error
: 0
※
To prevent the loss of data for the print timeout, please use the function
‘
NewRealRead
’
to check the status, and go to the next step, when it
’
s normal.
3)long PrintCmd(unsigned char data);
Prints 1 byte of data. When printing big data spool, use the following PrintPacket
Value to increase the transfer Speed.
Parameters:
data : 1
byte data
(0~255)
Return :
Print Normal
: 1
Print Error
: 0
4)long NewRealRead(void);
Reads 1 byte of print status data using USB port
.
Parameters:
None
Return :
Read Normal : Print Status Value
Read Error : -1(Negative)