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: ptretter:charter at: 27-Jun-2002 14:24

I want to work with you on this. I also have /Pro and but haven't use library capabilities much. Paul Tretter ----- Original Message ----- From: "Bohdan or Rosemary Lechnowsky" <[amicom--sonic--net]> To: <[rebol-list--rebol--com]> Sent: Thursday, June 27, 2002 11:31 AM Subject: [REBOL] View/Pro and accessing Windows Printer API (gdi32.dll)
> Hello All! > > I am looking to add native printing support to my REBOL applications for > Windows, but I am running into a problem with the library component of > View/Pro. Here's the story: > > The following has C source code for sending raw data to a printer on
Windows.
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspo l_93g2.asp
> Converting it to View/Pro was going well until I hit the OpenPrinter
routine!.
> Here's a transcript of my efforts: > > >> gdi32: load/library %gdi32.dll > >> startdoc: make routine! ["Start Document" hdc [string!] docinfo > [struct! [cbsize [int] lpszdocname [string!] lpszoutput [string!] > lpszdatatype [string!] fwtype [int]]] return: [int]] gdi32 "StartDocA" > > ;So far, so good... > > >> openprinter: make routine! ["Open Printer" pprintername [string!] > phprinter [string!] pdefault [string!] return: [integer!]] gdi32
OpenPrinterA
> ** Access Error: Cannot open OpenPrinterA > ** Near: openprinter: make routine! ["Open Printer" pprintername [string!] > phprinter [string!] pdefault [string!] return: [integer!]] gdi32 > > OK, maybe OpenPrinterA is not the correct name, let's see: > > >> gdi32: read %/c/windows/system/gdi32.dll > >> find gdi32 "OpenPrinter" > >
{OpenPrinterA^@^@^@^@WritePrinter^@^@^@^@OPENGL32^@^@^@^@wglChoosePixelForma t^@^@^@^@wglDescribePixelFormat^@^@wglGetPixelFormat...