Re: What about php 5.3 and printers or PHP_PRINTER.DLL ?
| From: | Pierre Joye | Date: | Wed, 24 Feb 2010 09:26:42 +0000 |
| Subject: | Re: What about php 5.3 and printers or PHP_PRINTER.DLL ? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-29938@lists.php.net to get a copy of this message | ||
In this case it won't work with impersonate=1.
On Wed, Feb 24, 2010 at 1:36 AM, Louis Solomon <louis@steelbytes.com> wrote:
> 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@microsoft.com]
> Sent: Wednesday, 24 February 2010 3:50 AM
> To: RQuadling@googlemail.com
> Cc: Keith Davis; Pierre Joye; Robert; php-windows@lists.php.net
> Subject: RE: [PHP-WIN] 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@googlemail.com]
> Sent: Tuesday, February 23, 2010 1:28 AM
> To: Venkat Raman Don
> Cc: Keith Davis; Pierre Joye; Robert; php-windows@lists.php.net
> Subject: Re: [PHP-WIN] What about php 5.3 and printers or PHP_PRINTER.DLL ?
>
> On 22 February 2010 22:30, Venkat Raman Don <Don.Raman@microsoft.com> 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
>
>
--
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org