Model
Rev.
Page
HMK-056
Ver1.01
65
9. 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).
9-1) DLL Interface
Place the HwaUSB.DLL into the System32 folder or SysWow64 folder depending on your
Operating System’s bit version.
9-1-1) DLL (Funtions)
1)long UsbOpen(LPCTSTR SelPrinter);
Open the USB port to Printer Model “HMK-081”.
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