Sample Code

Windows Driver Samples/ Keyboard Input WDF Filter Driver (Kbfiltr)/ C++/ sys/ kbfiltr.inx/

; kbfiltr.inf
;
; Installation inf for the Device that needs filtering adapter.
;
; (c) Copyright 1999 Microsoft
;

[Version]
Signature="$Windows NT$"
Provider=%DDK_Ex%
ClassGUID={4D36E96B-E325-11CE-BFC1-08002BE10318}
Class=Keyboard
; Uncomment the following line when you have a valid catalog file.
;         If you use bogus catalog file installation will fail.
; Ignore the error from chkinf.
CatalogFile=KmdfSamples.cat

DriverVer=07/20/1999, 1.0.0.0

[DestinationDirs]
DefaultDestDir   = 12

;
; Driver information
;

[Manufacturer]
%DDK_Ex%   = DDK_Ex.Mfg,NT$ARCH$

; For Win2K
[DDK_Ex.Mfg]
%DDK_Ex% = kbfiltr, *PNP0BAAD

; For XP and above
[DDK_Ex.Mfg.NT$ARCH$]
%DDK_Ex% = kbfiltr, *PNP0BAAD

;
; General installation section
;

[kbfiltr.NT]
; perform port related actions from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst

; Copy the driver over
CopyFiles=kbfiltr.CopyFiles


;
; File sections
;

[kbfiltr.CopyFiles]
kbfiltr.sys


;
; Service Installation
;

[kbfiltr.NT.Services]
AddService = kbfiltr,  , kbfiltr_Service_Inst
; Install the port driver and mouclass from keyboard.inf
Include=keyboard.inf
Needs=STANDARD_Inst.Services

[kbfiltr_Service_Inst]
DisplayName    = %kbfiltr.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 0                  ; SERVICE_ERROR_IGNORE
LoadOrderGroup = Keyboard Port
ServiceBinary  = %12%\kbfiltr.sys

[kbfiltr.NT.HW]
; Add the device upper filter
AddReg = kbfiltr.HW.AddReg

; run the directives need by the port driver
Include=keyboard.inf
Needs=STANDARD_Inst.HW

[kbfiltr.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"kbfiltr"


;
; Source file information
;


[SourceDisksNames]
1 = %DiskId1%,,,

[SourceDisksFiles]
kbfiltr.sys = 1,,

;
;--- kbfiltr Coinstaller installation ------
;

[DestinationDirs]
kbfiltr_CoInstaller_CopyFiles = 11

[kbfiltr.NT.CoInstallers]
AddReg=kbfiltr_CoInstaller_AddReg
CopyFiles=kbfiltr_CoInstaller_CopyFiles

[kbfiltr_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"

[kbfiltr_CoInstaller_CopyFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll

[SourceDisksFiles]
WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames

[kbfiltr.NT.Wdf]
KmdfService = kbfiltr, kbfiltr_wdfsect
[kbfiltr_wdfsect]
KmdfLibraryVersion = $KMDFVERSION$



[Strings]

;
; Non-Localizable Strings
;

REG_SZ         = 0x00000000
REG_MULTI_SZ   = 0x00010000
REG_EXPAND_SZ  = 0x00020000
REG_BINARY     = 0x00000001
REG_DWORD      = 0x00010001
SERVICEROOT    = "System\CurrentControlSet\Services"

;
; Localizable Strings
;

DiskId1 = "DDK Example Installation Disk #1 (Keyboard)"
DDK_Ex = "DDK Example Device that needs filtering"
; Make sure the service description is unique to avoid collision with another INF.
kbfiltr.SvcDesc="WDK Keyboard Filter Example"

Our Services

  • What our customers say about us?

© 2011-2024 All Rights Reserved. Joya Systems. 4425 South Mopac Building II Suite 101 Austin, TX 78735 Tel: 800-DEV-KERNEL

Privacy Policy. Terms of use. Valid XHTML & CSS