RE: How to read my private devmode in OEMStartDoc ? by ashwinn
ashwinn
Wed Jul 21 13:22:02 CDT 2004
It can get complicated to access the private devmode within OEMStartDoc. So I'd suggest a different approach.
Instead of embedding your private data in the private devmode, I would have the UI module store this data in the pParameters field of the JOB_INFO_2 structure. Basically, your UI plug-in would implement IPrintOemUI2::DocumentEvent. When this function is called for DOCUMENTEVENT_STARTDOCPOST, the pvIn parameter points to the job id. You can use this job id to obtain the JOB_INFO_2 structure by calling GetJob. You would then set the pParameters member of the strct with the information that you want to pass to the rendering plug-in. Next would be a call to SetJob with the updated JOB_INFO_2 structure (set the Command parameter to 0). Note that you might need to set the Position member of the structure to JOB_POSITION_UNSPECIFIED before calling SetJob so that you don't get access denied.
In OEMStartDoc you can use GetJob (with the job id argument) again to get the JOB_INFO_2 structure and read back your private data from the pParameters member.
Hope this helps.
--
- Ashwin
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
"Benoit" wrote:
> Hello,
>
> I need to send data in OEMStartDoc(..) in ddihhok.cpp.
>
> This data are in my private devmode. They are set by my User Interface
> plug-in.
>
> How can I read this data in OEMStartDoc ?
>
>
> Thanks
>
>
> Benoit
>
>
>