How to connect a Windows print driver pipeline filter RRS feed

  • Question

  • I am looking into building a pipeline filter for a Windows printer driver (first time dabbling in the WDK) and unfortunately there are very few resources and examples that show how to do this. I have built and have been trying to attach the sample pipeline filter provided with the WDK to the basic Microsoft PCL 6 Class Driver that is included in Windows 10. No modifications to the code for the sample filter have been made.

    As far as I can tell from the documentation, all I need to do in order to attach a pipeline filter to a driver is to place the dll for the filter in the same location as the driver files and update the corresponding pipelineconfig.xml to reflect information from the sample pipeline filter, which I have done:

    <?xml version="1.0" encoding="utf-8"?>
    <Filter     dll  = "MSxpsPCL6.dll" clsid="{3821E518-33AF-4d17-92B3-28EB410D46B6}" name="Microsoft XPS to PCL6">
        <Input    guid = "{4d47a67c-66cc-4430-850e-daf466fe5bc4}" comment="IID_IPrintReadStream" />
        <Output   guid = "{65bb7f1b-371e-4571-8ac7-912f510c1a38}" comment="IID_IPrintWriteStream" />
        <Filter dll="WdkPipelineFilter.dll" clsid="{5f5460d2-b313-44ca-82e4-37f83d793999}" name="StreamFilter">
        <Input    guid = "{4d47a67c-66cc-4430-850e-daf466fe5bc4}" comment="IID_IPrintReadStream" />
        <Output   guid = "{65bb7f1b-371e-4571-8ac7-912f510c1a38}" comment="IID_IPrintWriteStream" />

    I've tried a few different variations of positioning with the filter excerpt for the PCL 6 dll and the sample WDK dll - putting the WDK before and after the PCL 6 one as well as removing the PCL 6 one altogether - however, no matter what I do any print jobs I send through this driver stall in the print queue, creating 0kb spool files that never make it to the printer. I've also tried calling the XPS filter built into the sample with the same result.

    I think there is something important I am missing but I can't put my finger on what it is. If anyone can provide some info on why this is failing I would appreciate it.

    • Edited by anon878787 Monday, October 15, 2018 8:12 PM Typo
    Thursday, October 11, 2018 7:22 PM