EDN Admin
Well-known member
<span style="color:#333333; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; font-size:13px; line-height:16px
<p style=" Hi,
<p style=" Ive got a custom virtual printer which listens for the DOCUMENTEVENT_STARTDOCPOST event, at which time we should a dialog for selecting the file name and saving options.
<p style=" With all other applications (that Ive seen so far), they obey the MSDN documentation for this event and pass in the print job ID in the pvIn parameter. This is something I need to initialise my dialog.
<p style=" However, with XPS viewer, the pvIn parameter always resolves to a job ID of 4, which is wrong. Also, the cbIn parameter which is meant to specify the size of pvIn is a rediculious 16 bytes, when its meant to be just 4 (sizeof(long)).
<p style=" For more information about the events, see here: http://msdn.microsoft.com/en-us/library/ff554141(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ff554141(v=vs.85).aspx
<p style=" Does anyone have any ideas why this might be?
<p style="
<p style=" Also, it seems to take an odd path of events, this is the order in which the events are called:
<p style="
<p style="
<p style=" DOCUMENTEVENT_QUERYFILTER
<p style=" DOCUMENTEVENT_CREATEDCPRE
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_QUERYFILTER
<p style=" DOCUMENTEVENT_CREATEDCPRE
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_DELETEDC
<p style="
<p style=" Printing dialog comes up....
<p style="
<p style=" DOCUMENTEVENT_QUERYFILTER
<p style=" DOCUMENTEVENT_CREATEDCPRE
<p style=" DOCUMENTEVENT_STARTDOCPOST
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_RESETDCPRE
<p style=" DOCUMENTEVENT_DELETEDC
<p style=" DOCUMENTEVENT_STARTDOCPRE
<p style=" DOCUMENTEVENT_DELETEDC
<p style="
<p style="
<p style=" Any suggestions as to why Im getting wrong job ids are appreciated! Thanks!
<p style="
<p style=" Andy.
View the full article
<p style=" Hi,
<p style=" Ive got a custom virtual printer which listens for the DOCUMENTEVENT_STARTDOCPOST event, at which time we should a dialog for selecting the file name and saving options.
<p style=" With all other applications (that Ive seen so far), they obey the MSDN documentation for this event and pass in the print job ID in the pvIn parameter. This is something I need to initialise my dialog.
<p style=" However, with XPS viewer, the pvIn parameter always resolves to a job ID of 4, which is wrong. Also, the cbIn parameter which is meant to specify the size of pvIn is a rediculious 16 bytes, when its meant to be just 4 (sizeof(long)).
<p style=" For more information about the events, see here: http://msdn.microsoft.com/en-us/library/ff554141(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ff554141(v=vs.85).aspx
<p style=" Does anyone have any ideas why this might be?
<p style="
<p style=" Also, it seems to take an odd path of events, this is the order in which the events are called:
<p style="
<p style="
<p style=" DOCUMENTEVENT_QUERYFILTER
<p style=" DOCUMENTEVENT_CREATEDCPRE
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_QUERYFILTER
<p style=" DOCUMENTEVENT_CREATEDCPRE
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_DELETEDC
<p style="
<p style=" Printing dialog comes up....
<p style="
<p style=" DOCUMENTEVENT_QUERYFILTER
<p style=" DOCUMENTEVENT_CREATEDCPRE
<p style=" DOCUMENTEVENT_STARTDOCPOST
<p style=" DOCUMENTEVENT_ESCAPE
<p style=" DOCUMENTEVENT_RESETDCPRE
<p style=" DOCUMENTEVENT_DELETEDC
<p style=" DOCUMENTEVENT_STARTDOCPRE
<p style=" DOCUMENTEVENT_DELETEDC
<p style="
<p style="
<p style=" Any suggestions as to why Im getting wrong job ids are appreciated! Thanks!
<p style="
<p style=" Andy.
View the full article