;/*++
;
;Copyright (c) Lenovo Inc All rights Reserved
;
;Module Name:
;
;    lenovoDriverHid.inf
;
;Abstract:
;    INF file for installing HID minidriver (UMDF 2 version)
;
;Installation Notes:
;    Using Devcon: Type "devcon install lenovoDriverHid.inf Root\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001" to install
;
;--*/
[Version]
Signature="$WINDOWS NT$"
Class = System
ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%ProviderString%
CatalogFile=lenovoDriverHid.cat
DriverVer = 09/02/2025,1.5.000.87
PnpLockdown=1

; ================= Device section =====================

[Manufacturer]
%ManufacturerString%=Microsoft, NTx86.6.3, NTamd64.6.3, NTx86.10.0...22000, NTamd64.10.0...22000,NTx86.10.0...26200,NTamd64.10.0...26200

[Microsoft.NTx86.6.3]
%DeviceDesc%=VhidminiUm, {63384FBF-F398-46AB-86C9-5CCDF1EC4917}\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001
%DeviceDesc%= VhidminiUm, VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001 ; Used by SwDeviceCreate

[Microsoft.NTamd64.6.3]
%DeviceDesc%=VhidminiUm, {63384FBF-F398-46AB-86C9-5CCDF1EC4917}\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001
%DeviceDesc%=VhidminiUm, VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001 ; Used by SwDeviceCreate

[Microsoft.NTx86.10.0...22000]
%DeviceDesc%=VhidminiUm_11, {63384FBF-F398-46AB-86C9-5CCDF1EC4917}\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001
%DeviceDesc%=VhidminiUm_11, VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001 ; Used by SwDeviceCreate

[Microsoft.NTamd64.10.0...22000]
%DeviceDesc%=VhidminiUm_11, {63384FBF-F398-46AB-86C9-5CCDF1EC4917}\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001
%DeviceDesc%=VhidminiUm_11, VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001 ; Used by SwDeviceCreate

[Microsoft.NTx86.10.0...26200]
%DeviceDesc%=VhidminiUm_11, {63384FBF-F398-46AB-86C9-5CCDF1EC4917}\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001
%DeviceDesc%=VhidminiUm_11, VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001 ; Used by SwDeviceCreate

[Microsoft.NTamd64.10.0...26200]
%DeviceDesc%=VhidminiUm_11, {63384FBF-F398-46AB-86C9-5CCDF1EC4917}\VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001
%DeviceDesc%=VhidminiUm_11, VID_LENOVO_INC_PID_LENOVO_DRIVER_HID_0001 ; Used by SwDeviceCreate

; ================= include depends =====================
;
;   Win 10

[VhidminiUm.NT]
CopyFiles=UMDriverCopy

[VhidminiUm.NT.hw]
AddReg=VhidminiUm_AddReg

[VhidminiUm.NT.Services]
AddService=WUDFRd,0x000001f8,WUDFRD_ServiceInstall
AddService=mshidumdf, 0x000001fa, mshidumdf.AddService ;flag 0x2 sets this as the service for the device

[VhidminiUm_AddReg]
HKR,,"LowerFilters",0x00010008,"WUDFRd" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND

[mshidumdf.AddService]
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mshidumdf.sys

[WUDFRD_ServiceInstall]
DisplayName    = %WudfRdDisplayName%
ServiceType    = 1
StartType      = 3
ErrorControl   = 1
ServiceBinary  = %12%\WUDFRd.sys

[VhidminiUm.NT.Wdf]
UmdfService="lenovoDriverHid", VhidminiUm_Install
UmdfServiceOrder=lenovoDriverHid
UmdfKernelModeClientPolicy=AllowKernelModeClients
UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects
UmdfMethodNeitherAction=Copy
UmdfFsContextUsePolicy=CanUseFsContext2
;UmdfHostPriority=PriorityHigh

[VhidminiUm_Install]
UmdfLibraryVersion=2.15.0
ServiceBinary="%12%\UMDF\lenovoDriverHid.dll"
ServiceBinary="%12%\UMDF\Lenovo.CertificateValidation.Native.dll"

; ================= include depends =====================
;
;   Win 11

[VhidminiUm_11.NT]
CopyFiles=UMDriverCopy
Include=WUDFRD.inf, mshidumdf.inf
Needs=WUDFRD.NT, MsHidUmdf.NT

[VhidminiUm_11.NT.hw]
AddReg=VhidminiUm_AddReg_11
Include=WUDFRD.inf, mshidumdf.inf
Needs=WUDFRD.NT.HW, MsHidUmdf.NT.HW

[VhidminiUm_11.NT.Services]
Include=WUDFRD.inf, mshidumdf.inf
Needs=WUDFRD_LowerFilter.NT.Services, MsHidUmdf.NT.Services

[VhidminiUm_11.Filters]
Include=WUDFRD.inf, mshidumdf.inf
Needs=WUDFRD_LowerFilter.NT.Filters, MsHidUmdf_LowerFilter.NT.Filters

[VhidminiUm_11.NT.Wdf]
UmdfService="lenovoDriverHid", VhidminiUm_Install_11
UmdfServiceOrder=lenovoDriverHid
UmdfKernelModeClientPolicy=AllowKernelModeClients
UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects
UmdfMethodNeitherAction=Copy
UmdfFsContextUsePolicy=CanUseFsContext2

[VhidminiUm_AddReg_11]
HKR,,"LowerFilters",0x00010008,"WUDFRd" ; FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND

[VhidminiUm_Install_11]
UmdfLibraryVersion=2.15.0
ServiceBinary="%12%\UMDF\lenovoDriverHid.dll"
ServiceBinary="%12%\UMDF\Lenovo.CertificateValidation.Native.dll"

; ================= copy files =====================

[UMDriverCopy]
lenovoDriverHid.dll,,,0x00004000  ; COPYFLG_IN_USE_RENAME
Lenovo.CertificateValidation.Native.dll,,,0x00004000  ; COPYFLG_IN_USE_RENAME

[SourceDisksNames.x86]
1 = %Disk_Description%,,,\x86

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

[SourceDisksFiles]
lenovoDriverHid.dll=1
Lenovo.CertificateValidation.Native.dll=1

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf

;---------------------------------------------------------------;

[Strings]
ProviderString     ="Lenovo Inc"
ManufacturerString ="Lenovo Inc"
Disk_Description   ="Lenovo HID minidriver Installation Disk"
DeviceDesc         ="Lenovo Virtuals HID Device"
WudfRdDisplayName  ="Windows Driver Foundation - User-mode Driver Framework Reflector"
