Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Feb : Windows GDI - ExtEscape POSTSCRIPT_PASSTHROUGH

www.cryer.info
Managed Newsgroup Archive

Windows GDI - ExtEscape POSTSCRIPT_PASSTHROUGH

Subject:Windows GDI - ExtEscape POSTSCRIPT_PASSTHROUGH
Posted by:"Steve Neese" (snee..@webmd.net)
Date:18 Feb 2005 08:55:46

I am trying to call the windows API function ExtEscape using the POSTSCRIPT_PASSTHROUGH escape function, and I cannot get it to work.  I keep getting an error 87 - ERROR_INVALID_PARAMETER.  I have the printer handle, the PS_PASSTHROUGH constant, and then the last two parms are 0 and nil.  I can't figure out how to pass the Postscript date that I want to pass to the printer into this function.  I've tried:
Length(MyString), @MyString
Length(MyString), PChar(MyString)
sizeof(MyArray), @MyArray  //where MyArray is an array of char
sizeof(P), P //where P is a PChar, set to PChar(MyString)

I even tried creating a structure of a Bytes (WORD), MyString (String), and then passing the size of my structure and a pointer to the structure.  In all cases, I am still getting Invaild Parameter.

Can anyone tell me how to properly call the ExtEscape API function from Delphi?

Replies:

www.cryer.info
Managed Newsgroup Archive