Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: View/Pro and accessing Windows Printer API (gdi32.dll)

From: greggirwin:mindspring at: 2-Jul-2002 11:54

Hi Bo, Here are the changes I made to get it (sort of) working here. . . . print "Define WritePrinter" writeprinter: make routine! [ "Write Printer" hprinter [int] lpdata [char*] dwcount [int] dwbyteswritten [char*] ;[int] This is another return value return: [int] ] winspool "WritePrinter" . . . byteswritten: null-buff 4 ; I had to add the form-feed here to make it flush on my laserjet. ; I'm not sure why the end-page stuff isn't doing it like I think it should. ; I could make it write to a file just fine without the form-feed. testdata: {The quick brown fox jumped over the lazy dogs.^L} print "Call WritePrinter" either zero? writeprinter hprinter testdata length? testdata byteswritten [ print "FAIL!" end-page-printer end-doc-printer close-printer ][print "Success"] byteswritten: to-integer to-binary head reverse byteswritten . . . --Gregg