;
; OISC_Driver.inf
;

[Version]
Signature="$WINDOWS NT$"
Class       = System
ClassGuid   = {4d36e97d-e325-11ce-bfc1-08002be10318}
Provider	= %ManufacturerName%
CatalogFile	= OISC_Driver.cat
PnpLockdown = 1
DriverVer	= 07/19/2021,1.0.0.9 ; Format: MM/DD/YYYY
Provider = Lenovo


[Manufacturer]
%ManufacturerName%=Standard,NTamd64

[Standard.NTamd64]
%DeviceName%=OISC_Device_Install, SWC\OISC_Driver

[SourceDisksFiles]
OISC_Driver.dll=1

[SourceDisksNames]
1 = %DiskName%

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

[OISC_Device_Install.NT]
CopyFiles=UMDriverCopy
AddReg=OISC_AddReg

[OISC_Device_Install.NT.hw]

[OISC_Device_Install.NT.Software]
AddSoftware = OISC_Device_componentsoftware,, OISC_Device_InstallSoftware

[OISC_Device_InstallSoftware]
SoftwareType = 2
SoftwareId = pfn://E046963F.LenovoDisplayRefresh_k1h2ywk1493x8
SoftwareFlags = 0

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

[OISC_Device_Install.NT.CoInstallers]
AddReg=CoInstallers_AddReg

[OISC_Device_Install.NT.Wdf]
UmdfService=OISC_Driver,OISC_Driver_Install
UmdfServiceOrder=OISC_Driver
UmdfImpersonationLevel=Impersonation ;same as _SECURITY_IMPERSONATION_LEVEL SecurityImpersonation : The driver can obtain the identity and privileges of the client but cannot impersonate the client.

[OISC_Driver_Install]
UmdfLibraryVersion=2.15.0 
ServiceBinary=%12%\UMDF\OISC_Driver.dll

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

[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WUDFCoinstaller.dll"

[OISC_AddReg]
HKR,"OISC_Driver","OffDisplayTimestamp",0x00010003 ,0 ; DWORD+NoClobber
HKR,"OISC_Driver","OnDisplayTimestamp",0x00010003 ,0  ; DWORD+NoClobber
HKR,"OISC_Driver","ComputedDisplayTime",0x00010003,0 ; DWORD+NoClobber
HKR,"OISC_Driver","Temp_TotalDisplayTime",0x00010001,0 ; DWORD temporary registry while BIOS could not support display time
;HKR,"OISC_Driver","NotTodayTime",0x00010001,720 ; DWORD 12 hrs
HKR,"OISC_Driver","RefreshResult", 0x00010003,0		; DWORD+NoClobber
HKR,"OISC_Driver","Temp_ThresholdDisplayTime",0x00010003, 390000 ; 6500 hours for initial count DWORD+NoClobber
HKR,"OISC_Driver","OCFlag",0x00010003,0 ;DWORD+NoClobber BINARY
HKR,"OISC_Driver","EOLFlag",0x00010003,0 ;DWORD+NoClobber BINARY
HKR,"OISC_Driver","RefreshTimeUTC",0x00010001,0 ;QWORD BINARY


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

[UMDriverCopy]
OISC_Driver.dll,,,0x00000008 ;COPYFLG_FORCE_FILE_IN_USE 

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

[Strings]
ManufacturerName="LENOVO INC."
ClassName="System"
DiskName = "OISC_Driver Installation Disk"
DriverName = "OISC_Driver"
WudfRdDisplayName="Windows Driver Foundation - User-mode Driver Framework Reflector"
DeviceName="Lenovo OLED Image Sticking Compensation Device"
GUID_DEVINTERFACE_OISC="573E8C73-0CB4-4471-A1BF-FAB26C31D384"
DEVPKEY_DeviceInterface_UnrestrictedAppCapabilities="026e516e-b814-414b-83cd-856d6fef4822"
CustomCapability="Lenovo.displayRefreshDriver_k1h2ywk1493x8"
OnDisplayTime="On_DisplayTime"
OffdisplayTime="Off_DisplayTime"

;
;----------------- Interface Section ----------------------
;
[OISC_Device_Install.NT.Interfaces] 
AddInterface= {%GUID_DEVINTERFACE_OISC%},,AddInterfaceSection 
 
[AddInterfaceSection] 
AddProperty= AddInterfaceSection.AddProps
 
[AddInterfaceSection.AddProps] 
; DEVPKEY_DeviceInterface_UnrestrictedAppCapabilities 
{%DEVPKEY_DeviceInterface_UnrestrictedAppCapabilities%}, 8, 0x2012,, %CustomCapability%
