I am trying to create virtual print driver with WDK and print driver v4. I want to have virtual printer installed in system, display my own UI when printing - in ideal case a .NET win or wpf form. In the end, virtual printer will contact web service and will send there XPS file + XML containing metadata entered in UI.
I tryed to use v4 driver. So far, I tryed to modify printer project in Visual Studio 2013, here is my inf file:
[Version]
Signature="$Windows NT$"
Class=Printer
ClassGuid={4D36E979-E325-11CE-BFC1-08002BE10318}
Provider=%ManufacturerName%
CatalogFile=MyV4PrintDriver.cat
ClassVer=4.0
DriverVer=08/01/2012,1.0.0.0
[DestinationDirs]
DefaultDestDir = 66000
[SourceDisksNames]
1 = %DiskName%,,,""
[SourceDisksFiles]
MyV4PrintDriver.gpd=1
MyV4PrintDriver-manifest.ini=1
[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$
[Standard.NT$ARCH$]
%PrinterName%=DriverInstall,,test_virtual_printer
[Strings]
ManufacturerName="My company"
PrinterName="Test print driver"
DiskName="MyV4PrintDriver Installation Disk"
[DriverInstall]
CopyFiles=DriverFiles
[DriverFiles]
MyV4PrintDriver.gpd
MyV4PrintDriver-manifest.ini
I have test PC to deploy driver to (Win 8.1 in HyperV). Visual studio returns error on deployment. Unfortunatelly, log information in C:\DriverTest\Logs is not very usefull - says "Error HRESULT E_FAIL has been returned from call to a COM component"
I also tryed to install driver manually by running command:
rundll32 printui.dll,PrintUIEntry /ia /f "D:\Driver\MyV4PrintDriver.inf" /m "Test print driver"
But I am receiving 0x80004005 - Unspecified error.
Log files %windir%\inf\setupapi.* does not contain any error message too. - zip with logs from running deploy by Visual Studio and by running command are here
My question is: - Does anybody have any idea what could possibly be wrong? - Is my syntax of INF file correct, especially part with hardware ID? - I have no HWID since i am installing virtual printer:
[Standard.NT$ARCH$]
%PrinterName%=DriverInstall,,test_virtual_printer
Driver package is signed with test certificate, but running
signtool verify /v /c myv4printdriver.cab myv4printdriver.inf
gives an error - "A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider". My test certificate is installed on test machine in trusted root certificates..
- which log should I enable / check or which tool should I use, in order to see better error message or find some possible info about what is wrong?