Hi,
We are trying to upgrade the application from PB12.5 to PB 2022 R2. Currently we are encountering the Label printing issue.
In PB12.5, the declared external function signature is working well. But in PB2022 R2 Version the same signature is not working.
Application uses winspool.drv External Function to Open, StartDoc, WritePrinter and ClosePrinter to print to the Label printer (Honeywell).
I am getting the handle when opening the Printer, but commands which are set to WritePrinter is not printed in the printer. Basically no response from the printer.
Please kindly provide how the signature of this external function needs to be modified.
External Function Declarations:
FUNCTION Boolean OpenPrinter( &
String PrinterName, &
REF ULong hPrinter, &
Long NULL) LIBRARY "winspool.drv" ALIAS FOR "OpenPrinterW"
FUNCTION Long StartDocPrinter( &
Long hPrinter, &
Long Level, &
Str_DocInfo pDocInfo) LIBRARY "winspool.drv" ALIAS FOR "StartDocPrinterW"
FUNCTION Long StartPagePrinter( &
Long hPrinter) LIBRARY "winspool.drv"
FUNCTION Long WritePrinter( &
Long hPrinter, &
String pBuf, &
Long cdBuf, &
REF Long pcWritten) LIBRARY "winspool.drv" ALIAS FOR "WritePrinter;Ansi"
FUNCTION Long EndPagePrinter( &
Long hPrinter) LIBRARY "winspool.drv"
FUNCTION Long EndDocPrinter( &
Long hPrinter) LIBRARY "winspool.drv"
FUNCTION Boolean ClosePrinter(Long hPrinter) LIBRARY "winspool.drv"
Thank you,
Vijay