I tried to write a sample inf to achieve this, but ‘chkinf’ is giving me a warning -
"Line 44: (W22.1.2004) Service test already defined in section [test_Service_Inst_second]. "
With above warning in INF, I able to get both interrupts (INTx and MSI) for respective devices (tested on both devices separately, still need to test with both devices on the same system).
But is my approach is correct as ‘chkinf’ is giving warning?
To solve above warning if I change below line
{quote1}
[test_first.Services]
AddService = test, 0x00000002, test_Service_Inst_first
{\quote1}
to
{quote2}
[test_first.Services]
AddService = test1, 0x00000002, test_Service_Inst_first
{\quote2}
I get error by ‘chkinf’ -
"?Line 65: (E22.1.1009) Cannot use same binary test for multiple services - already used for service named $WinDir$\system32\drivers\test.sys. "
:(
Here is the whole INF for reference, if required -
{quote}
;Copyright (c) Test 2015. All rights reserved.
[Version]
Signature = “$Windows NT$”
Provider = %test%
ClassGUID = {4D36E97B-E325-11CE-BFC1-08002BE10318}
Class = SCSIAdapter
DriverVer = 04/16/2015,1.0.0.0000
CatalogFile.ntamd64 = test.cat
PnpLockDown = 1
[SourceDisksNames]
1 = %test_Desc%
[SourceDisksFiles]
test.sys = 1
[DestinationDirs]
DefaultDestDir = 12
[ControlFlags]
ExcludeFromSelect = *
[Manufacturer]
%test% = TEST,ntamd64
[TEST.ntamd64]
;second
%test_Desc%=test_second, PCI\CC_010802
; first
%test_Desc%=test_first,PCI\VEN_8086&DEV_A106&subsys_06A71028
[test_second]
CopyFiles = DefaultDestDir
[test_first]
CopyFiles = DefaultDestDir
[DefaultDestDir]
test.sys,0x00002004
[test_first.Services]
AddService = test, 0x00000002, test_Service_Inst_first
[test_second.Services]
AddService = test, 0x00000002, test_Service_Inst_second
[test_second.HW]
AddReg = msi_addreg
[msi_addreg]
HKR, Interrupt Management, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010
HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, %REG_DWORD%, 1
HKR, Interrupt Management\MessageSignaledInterruptProperties, MessageNumberLimit, %REG_DWORD%, 64
HKR, Interrupt Management\Affinity Policy, 0x00000010
HKR, Interrupt Management\Affinity Policy, DevicePolicy, %REG_DWORD%, 3
[test_Service_Inst_first]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_SEVERE%
ServiceBinary = %12%\test.sys
AddReg = test_Inst_AddReg_first
[test_Service_Inst_second]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_SEVERE%
ServiceBinary = %12%\test.sys
LoadOrderGroup = SCSI miniport
AddReg = test_Inst_AddReg_second
[test_Inst_AddReg_first]
HKR, “Parameters\PnpInterface”, 5, 0x00010001, 0x00000001
HKR, “Parameters\Device”, “NumberOfRequests”, 0x00010001, 254
HKR, “Parameters”, “BusType”, 0x00010001, 0x00000008
[test_Inst_AddReg_second]
HKR, “Parameters\PnpInterface”, 5, %REG_DWORD%, 0x00000001
HKR, “Parameters”, “BusType”, %REG_DWORD%, 0x00000011
[Strings]
test = “TEST”
test_Desc = “testing INF”
REG_EXPAND_SZ = 0x00020000
REG_DWORD = 0x00010001
SERVICE_KERNEL_DRIVER = 1
SERVICE_BOOT_START = 0
SERVICE_ERROR_NORMAL = 1
SERVICE_ERROR_SEVERE = 2
{\quote}