Printing Files in NE for Windows
Posted in 1996
If anyone is looking for a way to print files directly from NewEra I have found a simple Windows function to do this: ------- begin code --------------------------------------- # prn_file.4gl function prnfile( wfile ) define wfile char(32) define wres integer BEGIN_C wres = SpoolFile( NULL, "LPT1:", "ProgramID", wfile ); END_C return wres end function # eof prn_file.4gl ---------------------------------------------------------- Notes from Win3.1 Docs: HANDLE SpoolFile(lpszPrinter, lpszPort, lpszJob, lpszFile) lpszPrinter; /* printer name */ lpszPort; /* port name */ lpszJob; /* job name */ lpszFile; /* file name */ Return values less than zero are errors. The printer name is not very useful as it is something like "HP LaserJet IV". -- Carlos Costa e Silva ccs@minimal.pt