;*****************************************************************************
; INF for Razer's Virtual Keyboard Project
; Copyright © 2013 Razer Inc.  All Rights Reserved.
;
;Module name:
;
;	rzvkeyboard.inx
;
;Abstract:
;	Installation inf for Razer's Virtual Keyboard device driver
;
;*****************************************************************************

[Version]
Signature="$CHICAGO$"
Class=HIDClass
ClassGuid={745a17a0-74d3-11d0-b6fe-00a0c90f57da}
Provider=%Razer%
;LayoutFile=layout.inf
DriverVer=11/25/2015,6.2.9200.16384
;CatalogFile=rzvkeyboard.cat
CatalogFile.NTx86 = rzvkeyboard.cat
CatalogFile.NTAMD64 = rzvkeyboard_64.cat

;
;   Layout.inf (etc.) list all files shipped with the operating system so the 
;   source description sections are only needed if other files are needed.
;   
;   In order to use IHV drivers, the SourceDisksNames section must list the 
;   disk(s) containing the drivers and the SourceDisksFiles section must list 
;   which disk number each file to be copied is found on.
;   Disk number 99 is used to avoid a conflict with the disk numbers defined 
;   in layout.inf
;
;   Files used in a driver installation need to be digitally signed otherwise 
;   installation may fail.  See documentation elsewhere in the DDK regarding 
;   driver signing.

[SourceDisksFiles]
rzvkeyboard.sys = 99
rzkbdhid.sys = 99
WdfCoInstaller01009.dll=99 ; make sure the number matches with SourceDisksNames

[SourceDisksNames]
99 = %DiskId1%,,,""

[DestinationDirs]
CopyFunctionDriver = 12      
CopyFunctionDriverWin7 = 12  
rzvkeyboard.Inst_CoInstaller_CopyFiles = 11    

[Manufacturer]
%Razer%=Standard, NTx86, NTx86.6.1

; For Win2K
[Standard]
%RzVKeyboard%          = rzvkeyboard.Inst, {F8128979-7147-48F0-945D-8FC3DA1CDE76}\HID_DEVICE
%RzDAdder%             = rzvkeyboard.Inst, {06EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzDAdder1%            = rzvkeyboard.Inst, {16EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzDAdder2%            = rzvkeyboard.Inst, {26EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzOrochi2%            = rzvkeyboard.Inst, {5526A646-7B15-4852-8FF4-713D3B2851A4}\HID_DEVICE
%RzAbyssus2014%        = rzvkeyboard.Inst, {A2D116E3-0D33-4015-A9A8-50770FDCFA1D}\HID_DEVICE
%Razer004D.DeviceDesc% = rzvkeyboard.Inst, {05DF3C8D-DEB4-4402-9FC3-6B0C6C51741E}\HID_DEVICE
%Razer004F.DeviceDesc% = rzvkeyboard.Inst, {1E4A4C74-CD1F-4022-A4FD-204A1310E649}\HID_DEVICE
%Razer0056.DeviceDesc% = rzvkeyboard.Inst, {D8CFA6CB-CA6C-44AC-89A2-F522FFBEF534}\HID_DEVICE

; For XP and later
[Standard.NTx86]
%RzVKeyboard%          = rzvkeyboard.Inst, {F8128979-7147-48F0-945D-8FC3DA1CDE76}\HID_DEVICE
%RzDAdder%             = rzvkeyboard.Inst, {06EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzDAdder1%            = rzvkeyboard.Inst, {16EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzDAdder2%            = rzvkeyboard.Inst, {26EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzOrochi2%            = rzvkeyboard.Inst, {5526A646-7B15-4852-8FF4-713D3B2851A4}\HID_DEVICE
%RzAbyssus2014%        = rzvkeyboard.Inst, {A2D116E3-0D33-4015-A9A8-50770FDCFA1D}\HID_DEVICE
%Razer004D.DeviceDesc% = rzvkeyboard.Inst, {05DF3C8D-DEB4-4402-9FC3-6B0C6C51741E}\HID_DEVICE
%Razer004F.DeviceDesc% = rzvkeyboard.Inst, {1E4A4C74-CD1F-4022-A4FD-204A1310E649}\HID_DEVICE
%Razer0056.DeviceDesc% = rzvkeyboard.Inst, {D8CFA6CB-CA6C-44AC-89A2-F522FFBEF534}\HID_DEVICE

; For Win7 and later so that we can use inbox HID-KMDF mapper
[Standard.NTx86.6.1]
%RzVKeyboard%          = rzvkeyboard.Inst.Win7, {F8128979-7147-48F0-945D-8FC3DA1CDE76}\HID_DEVICE
%RzDAdder%             = rzvkeyboard.Inst.Win7, {06EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzDAdder1%            = rzvkeyboard.Inst.Win7, {16EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzDAdder2%            = rzvkeyboard.Inst.Win7, {26EA057E-3926-43C6-B752-353F3D0BF493}\HID_DEVICE
%RzOrochi2%            = rzvkeyboard.Inst.Win7, {5526A646-7B15-4852-8FF4-713D3B2851A4}\HID_DEVICE
%RzAbyssus2014%        = rzvkeyboard.Inst.Win7, {A2D116E3-0D33-4015-A9A8-50770FDCFA1D}\HID_DEVICE
%Razer004D.DeviceDesc% = rzvkeyboard.Inst.Win7, {05DF3C8D-DEB4-4402-9FC3-6B0C6C51741E}\HID_DEVICE
%Razer004F.DeviceDesc% = rzvkeyboard.Inst.Win7, {1E4A4C74-CD1F-4022-A4FD-204A1310E649}\HID_DEVICE
%Razer0056.DeviceDesc% = rzvkeyboard.Inst.Win7, {D8CFA6CB-CA6C-44AC-89A2-F522FFBEF534}\HID_DEVICE

;===============================================================
;   hidusbfx2 for Win2K thru Vista
;===============================================================
[rzvkeyboard.Inst.NT]
CopyFiles = CopyFunctionDriver

[rzvkeyboard.Inst.NT.HW]
AddReg = rzvkeyboard_Parameters.AddReg 

;
; rzhidmap is the function driver and rzvkeyboard is the lower filter
;
[rzvkeyboard.Inst.NT.Services]
AddService = rzkbdhid,,rzhidmap_Service_Inst,
AddService = rzvkeyboard,0x00000002, rzvkeyboard_Service_Inst

[CopyFunctionDriver]
rzkbdhid.sys
rzvkeyboard.sys

[rzvkeyboard_Parameters.AddReg]
HKR,,"UpperFilters",0x00010000,"rzkbdhid"

[rzhidmap_Service_Inst]
DisplayName    = %rzhidmap.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START 
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\rzkbdhid.sys
LoadOrderGroup = PNP Filter

;===============================================================
;   rzvkeyboard for Win7
;   Instead of using rzhidmap.sys as a filter, use the inbox 
;   mshidkmdf.sys as a mapper filter
;===============================================================
[rzvkeyboard.Inst.Win7.NT]
; Just copy the driver. No need to copy other system binaries.
CopyFiles = CopyFunctionDriverWin7

[rzvkeyboard.Inst.Win7.NT.HW]
AddReg = rzvkeyboard_Win7_Parameters.AddReg 

;
; rzhidmap is the function driver and rzvkeyboard is the lower filter
;
[rzvkeyboard.Inst.Win7.NT.Services]
AddService = rzvkeyboard,0x00000002, rzvkeyboard_Service_Inst

[rzvkeyboard_Win7_Parameters.AddReg]
HKR,,"UpperFilters",0x00010000,"mshidkmdf"

[CopyFunctionDriverWin7]
rzvkeyboard.sys

;===============================================================
;   Sections common to all OS versions
;===============================================================

[rzvkeyboard_Service_Inst]
DisplayName    = %rzvkeyboard%
ServiceType    = %SERVICE_KERNEL_DRIVER% 
StartType      = %SERVICE_DEMAND_START% 
ErrorControl   = %SERVICE_ERROR_IGNORE% 
ServiceBinary  = %12%\rzvkeyboard.sys
LoadOrderGroup = PNP Filter 

;================================================================
;--- WDF Coinstaller installation ------
;

[rzvkeyboard.Inst.NT.CoInstallers]
AddReg=rzvkeyboard.Inst_CoInstaller_AddReg
CopyFiles=rzvkeyboard.Inst_CoInstaller_CopyFiles

[rzvkeyboard.Inst_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000, "WdfCoInstaller01009.dll,WdfCoInstaller"

[rzvkeyboard.Inst_CoInstaller_CopyFiles]
WdfCoInstaller01009.dll,,,0x00000010    ;COPYFLG_NO_OVERWRITE (for win2k)

[rzvkeyboard.Inst.NT.Wdf]
KmdfService = rzvkeyboard, rzvkeyboard_wdfsect
[rzvkeyboard_wdfsect]
KmdfLibraryVersion = 1.9

[Strings] 
;  *******Localizable Strings******* 
Razer                = "Razer"
DiskId1              = "Razer Virtual Keyboard Installer"
rzhidmap.SVCDESC     = "Razer HID Keyboard Driver Service"
rzvkeyboard          = "Razer Virtual Keyboard Driver" 
RzDAdder             = "Razer DeathAdder Keyboard" 
RzDAdder1            = "Razer DeathAdder 3.5G Keyboard" 
RzDAdder2            = "Razer DeathAdder 3.5G Black Keyboard" 
RzOrochi2            = "Razer Orochi Keyboard" 
RzAbyssus2014        = "Razer Abyssus Keyboard" 
Razer004D.DeviceDesc = "Razer DeathAdder"
Razer004F.DeviceDesc = "Razer DeathAdder"
Razer0056.DeviceDesc = "Razer Orochi Keyboard" 

;  *******Non Localizable Strings******* 

SERVICE_BOOT_START     = 0x0 
SERVICE_SYSTEM_START   = 0x1 
SERVICE_AUTO_START     = 0x2 
SERVICE_DEMAND_START   = 0x3 
SERVICE_DISABLED       = 0x4 

SERVICE_KERNEL_DRIVER  = 0x1 
SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2 
SERVICE_ERROR_CRITICAL = 0x3 

REG_EXPAND_SZ          = 0x00020000 
REG_DWORD              = 0x00010001 
REG_MULTI_SZ           = 0x00010000
REG_BINARY             = 0x00000001
REG_SZ                 = 0x00000000
