Below are the relevant parts of a program for printing to my PC printer. I am running Windows 10 and Visual Studio. The program prints the "howdy" line, but if don't call "PC_PRINTER_REDIRECTION_PROC" the printer does not print "howdy"
I thought the main purpose of the "PC_PRINTER_REDIRECTION_PROC" call was so you could get the printer handle and do things like set the font - have not seen anything saying that you have to do the call. What am I missing?
I can comment out the call to set the font in "SetFont" and it still prints.
------------------------------------------------------------------------------
Select PrintFile assign to printer
organization is line sequential
file status is file-status.
FD PrintFile.
01 PrintRec pic x(80).
set user-func to entry "SetFont".
call "PC_PRINTER_REDIRECTION_PROC"
using by value flags
user-func
end-call.
open output PrintFile.
move 'howdy' to PrintRec.
write PrintRec after advancing 0 lines.
close PrintFile.
entry "SetFont" using by value printer-handle.
call "PC_PRINTER_SET_FONT"
using printer-handle
font-family-name
by value font-size
by value font-style
returning status-code
end-call.
exit program returning status-code.