none
Unable to run XPSDrv Driver and Filter Sample RRS feed

  • Question

  • Hello

    I'm facing to a problem with XPSDrv Driver and Filter Sample on my Windows 7 x64 machine

    1. I installed Visual Studio Ultimate 2013
    2. I installed WDK 8.1
    3. I installed WDK 8.1 Test Pack

    I installed everything from this site and I think that's all what I need for building the sample.

    Next I downloaded XPSDrv Driver and Filter Sample from http://code.msdn.microsoft.com/windowshardware/XPSDrv-Driver-and-Filter-980d24bc (btw. there is a step-by-step tutorial how to build the sample)

    • 1. Open the solution file in Visual Studio 2013 (I opened solution C++\XPSDrvSmpl.sln)
    • 2. Add all non-binary files (usually located in the \install directory of the sample) to the Package project
    •      a. In the Solution Explorer, right click Driver Files (HERE IS THE PROBLEM, WHAT IS DRIVER FILES ??? SEE PICTURE BELOW)
    •      b. Select Add, then click Existing Item
    •      c. Navigate to the location to which you downloaded the sample, and select all the files in the install directory, or the equivalent set of non-binary files such as INFs, INIs, GPD, PPD files, etc.
    •      d. Click Add

    Look at the picture how does my solution look like:

    Can anybody tell me what I'm doing wrong?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    • Edited by Lukas.Kubis Thursday, January 16, 2014 10:26 AM grammar fix
    Thursday, January 16, 2014 8:36 AM

Answers

  • I have the same problem. I have added manually a driver install package and configured it with the step by step tutorial. Then I had to rename everythin in the inf file from Microsoft to another manufacturer name because I got an "file not found" error while installing the driver. After renaming it succeeded.
    Tuesday, July 8, 2014 2:29 PM
  • There is indeed an issue with the WDK 8.1 XPSDrv Driver and Filter sample: it does not contain a driver package, which explains why you couldn't follow the step-by-step tutorial. The workaround is what Marcel suggested: manually add a driver install package and use it to package the sample driver.

    We will get the documentation updated, and fix this issue in a later WDK release.


    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 11, 2014 12:49 AM

All replies

  • I have the same problem. I have added manually a driver install package and configured it with the step by step tutorial. Then I had to rename everythin in the inf file from Microsoft to another manufacturer name because I got an "file not found" error while installing the driver. After renaming it succeeded.
    Tuesday, July 8, 2014 2:29 PM
  • There is indeed an issue with the WDK 8.1 XPSDrv Driver and Filter sample: it does not contain a driver package, which explains why you couldn't follow the step-by-step tutorial. The workaround is what Marcel suggested: manually add a driver install package and use it to package the sample driver.

    We will get the documentation updated, and fix this issue in a later WDK release.


    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, July 11, 2014 12:49 AM
  • Any chance I could trouble you for a bit more detail on how you setup the install package (and perhaps the specific changes made to the inf)? I've added an install package, added the files to "Driver Files" etc... but I've been fighting with it to recognize the inf (inf2cat doesn't even see that the inf is there)... For that matter, the Inf2Cat options disappear as soon as I add any files to the "Driver Files" setting. I haven't had any luck with the documentation I've found so far. I'm sure it's something terribly basic I'm missing (haven't really played with drivers much). Cheers!


    • Edited by Brad Parcels Wednesday, October 15, 2014 12:03 PM
    Wednesday, October 15, 2014 10:38 AM
  • So after I add the InstallPackage, I added all the files in the install folder to the driver files. Than I added all the files of the install folder to the package files in the properties of the driver package. I also added all the dlls of the sample to the package files. Then I edited the inf file:

    Change DriverVer to a new date,because the old one is not working.

    And this under the driverver:

    CatalogFile=xdsmpl.cat

    Add this to each Microsoft.xx sections: {GUID}

    Should look like this:

    [Microsoft.NTx86]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_PRE_VISTA,{GUID}

    [Microsoft.NTia64]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_PRE_VISTA,{GUID}

    ...

    Change the location of the dlls under SourceDisksFiles to 1 or leave it to 2 if you have subfolders for architecures.

    So my inf looks like that:

    ;
    ; Copyright (c) 2005  Microsoft Corporation
    ;
    ; All rights reserved.
    ;
    ; THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
    ; ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
    ; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
    ; PARTICULAR PURPOSE.
    ;
    ; File Name:
    ;
    ;    xdsmpl.inf
    ;
    ; Abstract:
    ;
    ;    XPSDrv sample driver install file
    ;
    [Version]
    Signature="$Windows NT$"
    Provider=%MS%
    ClassGUID={4D36E979-E325-11CE-BFC1-08002BE10318}
    Class=Printer
    DriverVer=09/19/2013,6.0.1.0
    CatalogFile=xdsmpl.cat
    
    [Manufacturer]
    %Microsoft%=Microsoft,NTx86,NTia64,NTamd64,NTx86.6.0,NTia64.6.0,NTamd64.6.0
    
    [Microsoft.NTx86]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_PRE_VISTA,{GUID}
    
    [Microsoft.NTia64]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_PRE_VISTA,{GUID}
    
    [Microsoft.NTamd64]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_PRE_VISTA,{GUID}
    
    [Microsoft.NTx86.6.0]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_VISTA,{GUID}
    
    [Microsoft.NTia64.6.0]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_VISTA,{GUID}
    
    [Microsoft.NTamd64.6.0]
    "XPSDrv Sample Driver" = INSTALL_XDSMPL_FILTERS_VISTA,{GUID}
    
    [INSTALL_XDSMPL_FILTERS_PRE_VISTA]
    CopyFiles=XPSDrvSample,ConfigPlugin,COLORPROFILES
    DriverFile=mxdwdrv.dll
    PrintProcessor="MS_XPS,filterpipelineprintproc.dll"
    ConfigFile=UniDrvUI.dll
    HelpFile=UniDrv.HLP
    DataFile=XDSmpl.GPD
    Include=NTPRINT.INF, MSXPSDRV.INF
    Needs=UNIDRV.OEM, XPSGPD.OEM, XPSDRV.OEM
    
    [INSTALL_XDSMPL_FILTERS_VISTA]
    CopyFiles=XPSDrvSample,ConfigPlugin,COLORPROFILES
    DriverFile=mxdwdrv.dll
    ConfigFile=UniDrvUI.dll
    HelpFile=UniDrv.HLP
    DataFile=XDSmpl.GPD
    ICMProfiles=xdwscRGB.icc
    CoreDriverSections="{D20EA372-DD35-4950-9ED8-A6335AFE79F0},UNIDRV.OEM", "{D20EA372-DD35-4950-9ED8-A6335AFE79F5},XPSDRV.OEM,XPSGPD.OEM"
    
    [PrinterPackageInstallation.x86]
    PackageAware=TRUE
    CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}, {D20EA372-DD35-4950-9ED8-A6335AFE79F5}
    
    [PrinterPackageInstallation.amd64]
    PackageAware=TRUE
    CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}, {D20EA372-DD35-4950-9ED8-A6335AFE79F5}
    
    [PrinterPackageInstallation.ia64]
    PackageAware=TRUE
    CoreDriverDependencies={D20EA372-DD35-4950-9ED8-A6335AFE79F0}, {D20EA372-DD35-4950-9ED8-A6335AFE79F5}
    
    [DestinationDirs]
    DefaultDestDir=66000
    COLORPROFILES=66003
    
    [COLORPROFILES]
    xdwscRGB.icc
    xdCMYKPrinter.icc
    
    [ConfigPlugin]
    XDSmpl.ini
    XDSmplUI.dll
    
    [XPSDrvSample]
    xdsmpl.gpd
    xdnames.gpd
    xdwmark.gpd
    xdbook.gpd
    xdcolman.gpd
    xdnup.gpd
    xdpgscl.gpd
    xdwmark.dll
    xdcolman.dll
    xdbook.dll
    xdnup.dll
    xdscale.dll
    xdsmpl-pipelineconfig.xml
    
    [SourceDisksNames.x86]
    1 = %Location%,,
    2 = %Location%,,,x86
    
    [SourceDisksNames.ia64]
    1 = %Location%,,
    2 = %Location%,,,ia64
    
    [SourceDisksNames.amd64]
    1 = %Location%,,
    2 = %Location%,,,amd64
    
    [SourceDisksFiles]
    xdsmpl.gpd                    = 1
    xdnames.gpd                   = 1
    xdwmark.gpd                   = 1
    xdbook.gpd                    = 1
    xdcolman.gpd                  = 1
    xdnup.gpd                     = 1
    xdpgscl.gpd                   = 1
    xdsmpl-pipelineconfig.xml     = 1
    xdsmpl.ini                    = 1
    xdwscRGB.icc                  = 1
    xdCMYKPrinter.icc             = 1
    xdwmark.dll                   = 1
    xdcolman.dll                  = 1
    xdbook.dll                    = 1
    xdnup.dll                     = 1
    xdsmplui.dll                  = 1
    xdscale.dll                   = 1
    
    [Strings]
    Location="XPSDrv Sample Driver Location"
    MS="Microsoft"
    Microsoft="Microsoft"

    Friday, February 27, 2015 9:31 AM