;
; gfspi.inf
;

[Version]
Signature="$Windows NT$"
Class=Biometric ; TODO: edit Class
ClassGuid={53D29EF7-377C-4D14-864B-EB3A85769359} ; TODO: edit ClassGuid
Provider=%ManufacturerName%
CatalogFile=gfspi.cat
DriverVer = 06/08/2018,1.0.20.800

[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%DeviceName%=MyDevice_Install, ACPI\GXFP3200 ; TODO: edit hw-id

;[ClassInstall32]
;AddReg=SampleClass_RegistryAdd

;[SampleClass_RegistryAdd]
;HKR,,,,%ClassName%
;HKR,,Icon,,"-10"
;HKR,,,,%ClassName%
;HKR,,Icon,,"-201"
;HKR,,IconPath,0x00010000,"%%SYSTEMROOT%%\system32\SysClass.dll,-201"

[SourceDisksFiles]
gfspi.dll=1
EngineAdapter.dll=1 ; Vendor engine adapter
Milan_Coating_NoSGX_x64_3.00.11.02_log.dll=1;
Milan_Coating_NoSGX_x64_v2.01.20.dll=1;

[SourceDisksNames]
1 = %DiskName%

; =================== UMDF Device ==================================

[MyDevice_Install.NT]
CopyFiles=UMDriverCopy, WinBioEngineAdapterCopy
AddProperty=Device_Properties

[MyDevice_Install.NT.hw]
AddReg=Biometric_Device_AddReg
AddReg=DriverPlugInAddReg, DatabaseAddReg

[MyDevice_Install.NT.Services]
AddService=WUDFRd,0x000001fa,WUDFRD_ServiceInstall

[MyDevice_Install.NT.Wdf]
UmdfService=gfspi,gfspi_Install
UmdfServiceOrder=gfspi
UmdfImpersonationLevel=Impersonation

; this enables direct hardware access from UMDF driver
UmdfDirectHardwareAccess=AllowDirectHardwareAccess

; direct i/o devices cannot run in default pool.
UmdfHostProcessSharing=ProcessSharingDisabled

[Device_Properties]
DeviceIcon,,,,"%%SYSTEMROOT%%\system32\SysClass.dll,-201" ; This is where a device specific icon can be specified.

[gfspi_Install]
UmdfLibraryVersion=2.15.0 
ServiceBinary=%12%\UMDF\gfspi.dll

[Biometric_Device_AddReg]
HKR,,"DeviceCharacteristics",0x10001,0x0100     ; Use same security checks on relative opens
HKR,,"Security",,"D:P(A;;GA;;;BA)(A;;GA;;;SY)"  ; Allow generic-all access to Built-in administrators and Local system
HKR,,"Exclusive",0x10001,1
HKR,,"SystemWakeEnabled",0x00010001,1
HKR,,"DeviceIdleEnabled",0x00010001,1
HKR,,"UserSetDeviceIdleEnabled",0x00010001,1
HKR,,"DefaultIdleState",0x00010001,1
HKR,,"DefaultIdleTimeout",0x00010001,5000
HKR,WudfPowerPolicysettings,"WdfDefaultWakeFromSleepState",0x00010001,1

[DriverPlugInAddReg]
HKR,WinBio\Configurations,DefaultConfiguration,,"0"
HKR,WinBio\Configurations\0,SensorMode,0x10001,1                                ; Basic - 1, Advanced - 2
HKR,WinBio\Configurations\0,SystemSensor,0x10001,1                              ; UAC/Winlogon - 1
HKR,WinBio\Configurations\0,SensorAdapterBinary,,"WinBioSensorAdapter.DLL"      ; Windows built-in WBDI sensor adapter.
HKR,WinBio\Configurations\0,EngineAdapterBinary,,"EngineAdapter.DLL"            ; Vendor engine
HKR,WinBio\Configurations\0,StorageAdapterBinary,,"WinBioStorageAdapter.DLL"    ; Windows built-in storage adapter
HKR,WinBio\Configurations\0,DatabaseId,,"6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50"  ; Unique database GUID

[DatabaseAddReg]
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},BiometricType,0x00010001,0x00000008
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},Attributes,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},Format,,"00000000-0000-0000-0000-000000000000"
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},InitialSize,0x00010001,0x00000020
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},AutoCreate,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},AutoName,0x00010001,0x00000001
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},FilePath,,""
HKLM,System\CurrentControlSet\Services\WbioSrvc\Databases\{6E9D4C5A-55B4-4c52-90B7-DDDC75CA4D50},ConnectionString,,""

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

[DestinationDirs]
UMDriverCopy=12,UMDF ; copy to drivers\umdf
WinBioEngineAdapterCopy=11,WinBioPlugins ; copy to \Windows\System32\WinBioPlugins
SvcCopyFiles=12;

[UMDriverCopy]
gfspi.dll

[WinBioEngineAdapterCopy]
EngineAdapter.dll
Milan_Coating_NoSGX_x64_3.00.11.02_log.dll
Milan_Coating_NoSGX_x64_v2.01.20.dll

[SignatureAttributes]
;sensor.dll = SignatureAttributes.WindowsHello
EngineAdapter.dll = SignatureAttributes.WindowsHello
;storage.dll = SignatureAttributes.WindowsHello
 
[SignatureAttributes.WindowsHello]
WindowsHello = true

; =================== Generic ==================================

[Strings]
ManufacturerName="Goodix FP" ;TODO: Replace with your manufacturer name
ClassName="Biometric Devices" ; TODO: edit ClassName
DiskName = "gfspi Installation Disk"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="Goodix Fingerprint SPI Device"
;SYSTEMROOT="C:\Windows"
