Do anyone know how to detect Print-to-File option from a printer driver plugin DLL
I like to be able to do this in Win9x, WinNT, Win2k and WinXP. Your advice is highl
appreciated

Thanks
Anthony

Re: Detecting Print-to-File option from a printer driver plugin DLL by Ashwin

Ashwin
Fri Feb 27 16:43:22 CST 2004

There is no sure way of figuring this out from the plug-in layer. It really
depends on how the app chooses to implement print-to-file. You might be
figure this out by looking at the DOCINFO structure that is passed to GDI in
its StartDoc call. You can access this structure by implementing the
DrvDocumentEvent hook in your plug-in and catching the
DOCUMENTEVENT_STARTDOCPRE event. If the printer itself has been installed on
the FILE: port, then you can detect this by examining the
DOCEVENT_CREATEDCPRE structure passed to you at DOCUMENTEVENT_CREATEDCPRE.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"Anthony" <anonymous@discussions.microsoft.com> wrote in message
news:8D21631E-1EB7-400F-AA0D-75DF8BBB77A5@microsoft.com...
> Do anyone know how to detect Print-to-File option from a printer driver
plugin DLL?
> I like to be able to do this in Win9x, WinNT, Win2k and WinXP. Your
advice is highly
> appreciated.
>
> Thanks,
> Anthony



Re: Detecting Print-to-File option from a printer driver plugin DLL by anonymous

anonymous
Mon Mar 01 12:06:10 CST 2004

Thanks for your advice. I'll give it a shot.

Re: Detecting Print-to-File option from a printer driver plugin DLL by Ashwin

Ashwin
Mon Mar 01 17:03:10 CST 2004

Firstly, this hook does not exist on W2K. It exists only on XP. But since XP
Unidrv and PScript were backported to W2K in SP3, you should be able to
implement this hook on W2K SP3. Second, this function is part of the UI
dll...so you cannot implement it in a rendering dll.

--
- Ashwin

Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.

"Anthony" <anonymous@discussions.microsoft.com> wrote in message
news:6C096AC3-DFB5-456C-A29D-1B33463AA9F0@microsoft.com...
> I've just done an experiment on Win2K platform. The DrvDocumentEvent
function is
> not called. Do you know if I need to setup the hook rather than simply
implement the
> function in my DLL? Also, can I implement this function in the rendering
DLL? The DDK
> documentation says that the function is called at user mode.
>
> Thanks,
> Anthony



Re: Detecting Print-to-File option from a printer driver plugin DLL by anonymous

anonymous
Mon Mar 01 17:31:08 CST 2004

Oh, I see. Thanks.

Anthony