locked
How to find out in V3 driver that it is invoked for Metro-style application?

    Question

  • Hello,

    Is there any way to determine inside V3 driver code what type of application (Metro-style or Desktop) is printing when our driver is invoked?

    Particularly we need this information inside our implementation of IPrintOemUI2::DocumentEvent for the DOCUMENTEVENT_STARTDOCPOST event.

    We need to implement different logic depending on the type of application that is printing.

    Friday, March 30, 2012 8:32 AM

Answers

  • I agree that scenario wouldn't be great for Metro style apps. Unfortunately, we don't have a supported mechanism to determine if the printing app is Metro style or not. We will try to get users to your custom print UI on the desktop after they have printed.

    Thanks!

    Justin

    Thursday, April 19, 2012 1:52 AM

All replies

  • kondakovdmitry,

    I will look into this for you.

    Best Wishes - Eric

    Saturday, March 31, 2012 6:34 AM
    Moderator
  • Hi Eric!

    It seems we have found a solution - when in DocumentEvent handler we call GetJob to get the JOB_INFO_1 structure for the current job.

    If data type of print job specified in JOB_INFO_1.pDatatype == "XPS2GDI" then we assume the printing is from Metro application, otherwise - it is from non-Metro application.

    This logic seems to have worked so far.

    Best regards,

    Dmitry.

    Tuesday, April 17, 2012 11:58 AM
  • Kondakovdmitry,

    Can you please expand on your scenario? Why do you need to know what kind of app is printing?

    Thanks!

    Justin

    Tuesday, April 17, 2012 5:20 PM
  • You should not take any dependencies on the "XPS2GDI" datatype. That datatype is for internal use only and we reserve the right to change our implementation in this space in the future.

    Thanks

    Justin

    Tuesday, April 17, 2012 5:37 PM
  • When printing we launch our post-processing application that allows user to alter print job before sending it to printer, without the need to change the original document. This post-processing application shows UI in desktop mode, so opening it for Metro-style applications is not appropriate.

    Wednesday, April 18, 2012 3:56 AM
  • I agree that scenario wouldn't be great for Metro style apps. Unfortunately, we don't have a supported mechanism to determine if the printing app is Metro style or not. We will try to get users to your custom print UI on the desktop after they have printed.

    Thanks!

    Justin

    Thursday, April 19, 2012 1:52 AM