;*****************************************************************************
; INF for Razer's Virtual Mouse Project
; Copyright © 2013 Razer Inc.  All Rights Reserved.
;
;Module name:
;
;   rzvmouse.inx
;
;Abstract:
;   Installation inf for Razer's Virtual Mouse 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=rzvmouse.cat
CatalogFile.NTx86 = rzvmouse.cat
CatalogFile.NTAMD64 = rzvmouse_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]
rzvmouse.sys = 99
rzmouhid.sys = 99
WdfCoInstaller01009.dll=99 ; make sure the number matches with SourceDisksNames

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

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

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

; For Win2K
[Standard]
%Razer0109%           = rzvmouse.Inst, {1A2D0B6C-3C19-4E5F-827A-7E7A9AF37841}\HID_DEVICE
%Razer010B%           = rzvmouse.Inst, {9A9C922D-DCF8-4D8D-875B-A4758C03A56D}\HID_DEVICE

; For XP and later
[Standard.NTAMD64]
%Razer0109%           = rzvmouse.Inst, {1A2D0B6C-3C19-4E5F-827A-7E7A9AF37841}\HID_DEVICE
%Razer010B%           = rzvmouse.Inst, {9A9C922D-DCF8-4D8D-875B-A4758C03A56D}\HID_DEVICE

; For Win7 and later so that we can use inbox HID-KMDF mapper
[Standard.NTAMD64.6.1]
%Razer0109%           = rzvmouse.Inst.Win7, {1A2D0B6C-3C19-4E5F-827A-7E7A9AF37841}\HID_DEVICE
%Razer010B%           = rzvmouse.Inst.Win7, {9A9C922D-DCF8-4D8D-875B-A4758C03A56D}\HID_DEVICE

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

[rzvmouse.Inst.NT.HW]
AddReg = rzvmouse_Parameters.AddReg 

;
; rzhidmap is the function driver and rzvmouse is the lower filter
;
[rzvmouse.Inst.NT.Services]
AddService = rzmouhid,,rzhidmap_Service_Inst,
AddService = rzvmouse,0x00000002, rzvmouse_Service_Inst

[CopyFunctionDriver]
rzmouhid.sys
rzvmouse.sys

[rzvmouse_Parameters.AddReg]
HKR,,"UpperFilters",0x00010000,"rzmouhid"

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

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

[rzvmouse.Inst.Win7.NT.HW]
AddReg = rzvmouse_Win7_Parameters.AddReg 

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

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

[CopyFunctionDriverWin7]
rzvmouse.sys

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

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

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

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

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

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

[rzvmouse.Inst.NT.Wdf]
KmdfService = rzvmouse, rzvmouse_wdfsect
[rzvmouse_wdfsect]
KmdfLibraryVersion = 1.9

[Strings] 
;  *******Localizable Strings******* 
Razer                = "Razer"
DiskId1              = "Razer Virtual Mouse Installer"
rzhidmap.SVCDESC     = "Razer HID Mouse Driver Service"
rzvmouse             = "Razer Virtual Mouse" 
Razer0109            = "Razer Lycosa Mouse" 
Razer010B            = "Razer Arctosa Mouse" 

;  *******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
