V4 Driver Development Windows

0

i am trying to do a very basic windows printer driver. It should just provide a .ppd file. So i started with this tutorial: Building a Basic v4 Printer Driver . However it's not very up-to date and i needed to do some changes to get it work with the newest version of VisualStudio 2019 and Windows Driver Kit (WDK) version 1903.

I am able to compile my Project and install my driver to the system. I did by checking the logs under %windir%\inf\setupapi.*. So now if i try to select this driver for an installed printer i get this error:

   File="" 
   Line="-1" 
   ErrCode="0x0" 
   ErrType="" 
   ErrorText="Error 0x00000000" 
   UserText="System.Runtime.InteropServices.COMException (0x80004005): Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler zur├╝ckgegeben.
   bei Microsoft.DriverKit.DefaultPrinterDriverPackageInstallationClass.InstallPrinterDriverFromPackage(String server, String infPath, String driverName, String environment, UInt32 flags)
   bei Microsoft.DriverKit.DefaultPrinterDriverPackageInstallationClass.PerformDefaultPrinterDriverPackageInstallation()" CA="7339403" LA="7340208" >

I am stuck here, i got the same error in the Event Viewer. setupapi logs are succeeded.

This is my .inf File:

[Version]
Signature="$Windows NT$"
Class=Printer
ClassGuid={4D36E979-E325-11CE-BFC1-08002BE10318}
Provider=%ManufacturerName%
CatalogFile=PrintConnect.cat
ClassVer=4.0
DriverVer=11/20/2019,1.0.0.0

[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$

[Standard.NT$ARCH$]
"Print" =   DriverInstall,,1284_CID_MS_PS

[DriverInstall]
CopyFiles=DriverFiles

[DriverFiles]
PrintConnect.ppd
PrintConnect-manifest.ini
PrintConnectRenderFilter-PipelineConfig.xml

[SourceDisksNames.amd64]
1 = %DiskName%,,,\.

[DestinationDirs]
DefaultDestDir = 66000

[SourceDisksFiles]
PrintConnect.ppd                                = 1
PrintConnect-manifest.ini                   = 1
PrintConnectRenderFilter-PipelineConfig.xml = 1

[Strings]
Location="."
DiskName="Default Disk"
ManufacturerName=""

Would be very glad for any help! Thanks in advance.

windows
printing
driver
asked on Stack Overflow Nov 25, 2019 by CrackOMad

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0