Hi,
I am trying to determine if a printer is postscript in Excel via VBA. I go the idea from KB C article here:
HTML Code:
http://support.microsoft.com/kb/264036
My declare is as follows:
Code:
Private Declare Function ExtEscape Lib "gdi32" _
   (ByVal hdc As Long, ByVal nEscape As Long, _
   ByVal cbInput As Long, ByVal lpszInData As String, _
   ByVal cbOutput As Long, ByVal lpszOutData As String) As Long
When I run:
Code:
lReturn = ExtEscape(lDC, GETTECHNOLOGY, 0, ByVal 0&, MAX_PATH, sTechnology)
I get a proper return for lReturn (=1) and sTechnology also returns a logical value so this means that GETTECHNOLOGY is an allowable escape BUT when I test for GETTECHNOLOGY support with:

Code:
lReturn = ExtEscape(lDC, QUERYESCSUPPORT, 4, GETTECHNOLOGY, 0, ByVal 0&)
lReturn=0 which means the function ran properly but GETTECHNOLOGY is not supported? How can it not be supported when it returns a proper value per above? I have tried many other Escape codes with QUERYESCSUPPORT and the return is always 0?

Is my code correct for QUERYESCSUPPORT, if so why always the zero return? Please note the for the element (lpzInData) is declared as a string but MSDN insturctions for QUERRYESCSUPPORT (and the C code) say to put the escape (which is long) being querried in that element? Is the MSDN documentation wrong? Is QUERYESCSUPPORT no longer valid?

Can anyone tell me how to use QUERYESCSUPPORT in VBA to determine if an escape is implemented?

Thanks in advance,

Tom

Note: Per forum rules this is a cross post from Microsoft's Office 2010 programing forum.