Home |
Function USBPrintData |
Function USBPrintDataUSBPrintData sends data for printing to a USB printer: BYTE USBPrintData(int PrinterIndex, const void * Data, int Len, int Timeout); ParametersPrinterIndexIndex of the USB printer to reset in the range 0 to 3. DataPointer to the data to print. LenNumber of bytes to send to the printer. TimeoutMaximum number of milliseconds to wait for the printer to accept the data. return valueStatus bit map of the printer. See USBPrinterStatus for details. If the function returns with status bit USB_PRN_TIMEOUT set, not all (but possibly portions) of the data have been sent to the printer. When this happens, the application must decide if it wants to retry the operation or cancel the print job. If it should be retried (i.e., wait longer), call USBPrintData again with parameters Len/Data set to 0/NULL. If the print job is to be aborted, call USBPrintCancel followed by USBPrinterInit.
|