capturing PS output in IPrintOemPS2::WritePrinter

Discussion in 'Windows Vista Drivers' started by jvilar, Jun 15, 2010.

  1. jvilar

    jvilar Guest

    I extended the oemps sample driver implementing the IPrintOemPS2 interface.
    After adding the two new methods and modifying the QueryInterface to expose
    also the new interface, the method IPrintOemPS2::WritePrinter is called only
    once with all arguments set to zero. I return S_OK in order to indicate that
    the method is implemented as commented in the documentation, but the method
    is not called any more.

    Should I do something else in addition to this to capture the pscript's
    output?

    Thanks in advance
     
    jvilar, Jun 15, 2010
    #1
    1. Advertisements

  2. jvilar

    jvilar Guest

    more info:

    If I return E_NOTIMPL from IPrintOemPS2::WritePrinter, then the pscript
    driver sends the expected ps data to the spooler bypassing the
    IPrintOemPS2::WritePrinter method. If I return S_OK instead, then the method
    is only called once with all arguments set to zero and nothing arrives to the
    spooler.
     
    jvilar, Jun 16, 2010
    #2
    1. Advertisements

  3. jvilar

    Guest

    Over 3 years later and I'm seeing this same thing. If someone has an answer or more info, please post it here as this is what turns up from Google searching on the subject "writeprinter not called". I'm only seeing this on Win7, not XP. On XP it works correctly.
     
    , Aug 21, 2013
    #3
  4. jvilar

    Guest

    Resolved my issue. I was using a port name that I had been using with a port monitor in some earlier testing. The port monitor DLL wasn't even installed, so the printer was setup to use a port with a port monitor that was "broken". I removed the port monitor from the registry, so that Windows would no longer attempt to use it. After that, everything started working correctly. WritePrinter is now called several times, allowing me to capture all PS data -- no port monitor required!
     
    , Aug 21, 2013
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.