XPS Sample Driver questionHi, <div><br/></div> <div>I am trying to modify xpsdrvsmpl to call another program shortly after the document</div> <div>starts to &quot;print&quot;. Where would be the best place to place the CreateProcess or ShellExecute</div> <div>call so that it only executes once? Thanks</div> <div><br/></div> <div>Randy</div> <div><br/></div>© 2009 Microsoft Corporation. All rights reserved.Thu, 22 Oct 2009 18:01:47 Z20f5f885-3549-4cac-8477-542046b8e134http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#20f5f885-3549-4cac-8477-542046b8e134http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#20f5f885-3549-4cac-8477-542046b8e134rjenovaihttp://social.msdn.microsoft.com/Profile/en-US/?user=rjenovaiXPS Sample Driver questionHi, <div><br/></div> <div>I am trying to modify xpsdrvsmpl to call another program shortly after the document</div> <div>starts to &quot;print&quot;. Where would be the best place to place the CreateProcess or ShellExecute</div> <div>call so that it only executes once? Thanks</div> <div><br/></div> <div>Randy</div> <div><br/></div>Fri, 26 Jun 2009 20:47:18 Z2009-06-26T20:47:18Zhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#cc317d75-d4af-4a9b-b463-809478bfa49fhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#cc317d75-d4af-4a9b-b463-809478bfa49fdigitalmercenaryhttp://social.msdn.microsoft.com/Profile/en-US/?user=digitalmercenaryXPS Sample Driver questionHi!<br/> <br/> You can to this in the User Interface DLL. see http://msdn.microsoft.com/en-us/library/bb734121.aspx with the DOCUMENTEVENT_STARTDOC event.<br/> <br/>Thu, 02 Jul 2009 08:24:14 Z2009-07-02T08:24:14Zhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#49154d4f-4cad-450d-95ae-c6a40019df58http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#49154d4f-4cad-450d-95ae-c6a40019df58rjenovaihttp://social.msdn.microsoft.com/Profile/en-US/?user=rjenovaiXPS Sample Driver questionThis worked well until I tried to move my driver to 64-bit vista and windows 7. It appears that the STARTDOC and ENDDOC events<br/> are not being called. Is this true and if so what can I do to workaround? Thanks<br/> <br/> Randy<br/>Tue, 20 Oct 2009 19:29:49 Z2009-10-20T19:29:49Zhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#44a76395-f607-469b-8c7d-b5fb1d66d96ahttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/20f5f885-3549-4cac-8477-542046b8e134#44a76395-f607-469b-8c7d-b5fb1d66d96arjenovaihttp://social.msdn.microsoft.com/Profile/en-US/?user=rjenovaiXPS Sample Driver questionI got it to work after adding the following to DOCUMENTEVENT_QUERYFILTER:<br/> <br/> <pre lang=x-cpp>if (pvOut) { DOCEVENT_FILTER* pFilter = (DOCEVENT_FILTER*)pvOut; pFilter-&gt;cElementsReturned = 6; pFilter-&gt;aDocEventCall[0] = DOCUMENTEVENT_ENDDOCPOST; pFilter-&gt;aDocEventCall[1] = DOCUMENTEVENT_STARTDOC; pFilter-&gt;aDocEventCall[2] = DOCUMENTEVENT_ENDDOC; pFilter-&gt;aDocEventCall[3] = DOCUMENTEVENT_STARTPAGE; pFilter-&gt;aDocEventCall[4] = DOCUMENTEVENT_ENDPAGE; pFilter-&gt;aDocEventCall[5] = DOCUMENTEVENT_XPS_ADDFIXEDDOCUMENTSEQUENCEPOST; *piResult = DOCUMENTEVENT_SUCCESS; ret = DOCUMENTEVENT_SUCCESS; } else { *piResult = DOCUMENTEVENT_UNSUPPORTED; ret = E_NOTIMPL; }</pre> I also made sure that piResult was not set as an unreferenced parameter<br/> <br/> Once these were added, the STARTDOC, ENDDOC, etc.. events were fired in windows x64.<br/>Thu, 22 Oct 2009 18:00:41 Z2009-10-22T18:03:31Z