RE: What about php 5.3 and printers or PHP_PRINTER.DLL ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DocumentProperties is probably trying to load some 3rd party printer dll extensions.  Suggest using procmon.exe and filter for access denied to see what is failing

Louis Solomon
www.SteelBytes.com

-----Original Message-----
From: Venkat Raman Don [mailto:Don.Raman@xxxxxxxxxxxxx] 
Sent: Wednesday, 24 February 2010 3:50 AM
To: RQuadling@xxxxxxxxxxxxxx
Cc: Keith Davis; Pierre Joye; Robert; php-windows@xxxxxxxxxxxxx
Subject: RE:  What about php 5.3 and printers or PHP_PRINTER.DLL ?

Richard, I tried that. I passed handle returned by OpenPrinter to DocumentProperties but same result. It's not that function fails for any bad parameter reason. I am getting error number 5 while calling GetLastError() which means some sort of access denied. But then why OpenPrinter is going through I am not able to understand.

Thanks,
Don.

-----Original Message-----
From: Richard Quadling [mailto:rquadling@xxxxxxxxxxxxxx] 
Sent: Tuesday, February 23, 2010 1:28 AM
To: Venkat Raman Don
Cc: Keith Davis; Pierre Joye; Robert; php-windows@xxxxxxxxxxxxx
Subject: Re:  What about php 5.3 and printers or PHP_PRINTER.DLL ?

On 22 February 2010 22:30, Venkat Raman Don <Don.Raman@xxxxxxxxxxxxx> wrote:
> DocumentProperties

http://msdn.microsoft.com/en-us/library/dd183576(VS.85).aspx

LONG DocumentProperties(
  __in   HWND hWnd,
  __in   HANDLE hPrinter,
  __in   LPTSTR pDeviceName,
  __out  PDEVMODE pDevModeOutput,
  __in   PDEVMODE pDevModeInput,
  __in   DWORD fMode
);

If the fMode parameter is zero, the return value is the size of the
buffer required to contain the printer driver initialization data.
Note that this buffer can be larger than a DEVMODE structure if the
printer driver appends private data to the structure.

If the function displays the property sheet, the return value is
either IDOK or IDCANCEL, depending on which button the user selects.

If the function does not display the property sheet and is successful,
the return value is IDOK.

If the function fails, the return value is less than zero.

---------------------------------

No indication upon what the failure is from the call to
DocumentProperties, but I wonder if supplying Null for the first 2
parameters is appropriate. The second parameter is probably going to
have to be the handle returned by OpenPrinter.

But this is just me reading the MSDN pages. I'm no expert! Sorry.

Richard.
-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux