;  Copyright (c) 2003 VIA Technologies, Inc.
; ****************************************************************************
; ****************************************************************************
; **    Filename:  VIDEPORT.INF
; **    Revision:  
; **    Date:      08/31/2005
; **    Abstract:  Windows* INF File for VIA Sotrage PORT Driver
; ****************************************************************************
; ****************************************************************************

[version]
CatalogFile= VIAcc.cat
CatalogFile.NTamd64= VIAccX64.cat


Signature="$WINDOWS NT$"
Class=hdc
ClassGuid={4D36E96A-E325-11CE-BFC1-08002BE10318}
Provider=%VIA%
DriverVer=04/03/2008,6.0.6000.252

[DestinationDirs]
DefaultDestDir = 12 ; DIRID_DRIVERS
CopyCoInstX32 = 11 ; System Dir( system32 on NT )
CopyCoInstX64 = 11;
CopyViBus = 12;
CopyViPrt = 12;
CopyViBusX64 = 12;
CopyViPrtX64 = 12;

[CopyViBus]
ViBus.sys

[CopyViPrt]
ViPrt.sys

[CopyViBusX64]
ViBusX64.sys

[CopyViPrtX64]
ViPrtX64.sys

[CopyCoInstX32]
vIdeInst.dll

[CopyCoInstX64]
vIdeInstX64.dll

[SourceDisksNames]
1 = %DiskName%,,,

[SourceDisksFiles]
ViPrt.sys = 1
ViBus.sys = 1
ViPrtX64.sys = 1
ViBusX64.sys = 1
vIdeInst.dll = 1
vIdeInstX64.dll = 1

[ControlFlags]
ExcludeFromSelect=1106-3149
ExcludeFromSelect=1106-3349
ExcludeFromSelect=1106-0581
ExcludeFromSelect=1106-0591
ExcludeFromSelect=1106-5287
ExcludeFromSelect=1106-5324
ExcludeFromSelect=1106-5337
ExcludeFromSelect=1106-5372
ExcludeFromSelect=PCI\VEN_1106&DEV_0571
ExcludeFromSelect=PCI\VEN_1106&DEV_3164
ExcludeFromSelect=PCI\VEN_1106&DEV_4149
ExcludeFromSelect=PCI\VEN_1106&DEV_3149
ExcludeFromSelect=PCI\VEN_1106&DEV_3349
ExcludeFromSelect=PCI\VEN_1106&DEV_0581
ExcludeFromSelect=PCI\VEN_1106&DEV_0591
ExcludeFromSelect=PCI\VEN_1106&DEV_5287
ExcludeFromSelect=PCI\VEN_1106&DEV_5324
ExcludeFromSelect=PCI\VEN_1106&DEV_5337
ExcludeFromSelect=PCI\VEN_1106&DEV_5372

[Manufacturer]
%VIA%=VIA_HDC, NTamd64

[VIA_HDC]
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-3149
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-3349
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-0581
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-0591
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-5287
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-5324
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-5337
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x32, 1106-5372
%PCI\VEN_1106&DEV_3149&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_3149&CC_0101
%PCI\VEN_1106&DEV_3349&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_3349&CC_0101
%PCI\VEN_1106&DEV_0581&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_0581&CC_0101
%PCI\VEN_1106&DEV_0591&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_0591&CC_0101
%PCI\VEN_1106&DEV_5287&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_5287&CC_0101
%PCI\VEN_1106&DEV_5324&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_5324&CC_0101
%PCI\VEN_1106&DEV_5337&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_5337&CC_0101
%PCI\VEN_1106&DEV_5372&CC_0101.DeviceDesc%=StorageBus_Inst_x32, PCI\VEN_1106&DEV_5372&CC_0101

[VIA_HDC.NTamd64]
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-3149
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-3349
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-0581
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-0591
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-5287
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-5324
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-5337
%VIAIDEChannel.DeviceDesc% = StoragePort_Inst_primary_x64, 1106-5372
%PCI\VEN_1106&DEV_3149&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_3149&CC_0101
%PCI\VEN_1106&DEV_3349&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_3349&CC_0101
%PCI\VEN_1106&DEV_0581&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_0581&CC_0101
%PCI\VEN_1106&DEV_0591&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_0591&CC_0101
%PCI\VEN_1106&DEV_5287&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_5287&CC_0101
%PCI\VEN_1106&DEV_5324&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_5324&CC_0101
%PCI\VEN_1106&DEV_5337&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_5337&CC_0101
%PCI\VEN_1106&DEV_5372&CC_0101.DeviceDesc%=StorageBus_Inst_x64, PCI\VEN_1106&DEV_5372&CC_0101

[StoragePort_Inst_primary_x32]
AddReg = StoragePort_Primary_AddReg
CopyFiles = CopyViPrt

[StoragePort_Inst_secondary_x32]
AddReg = StoragePort_Secondary_AddReg
CopyFiles = CopyViPrt

[StoragePort_Inst_primary_x64]
AddReg = StoragePort_Primary_AddReg
CopyFiles = CopyViPrtX64

[StoragePort_Inst_secondary_x64]
AddReg = StoragePort_Secondary_AddReg
CopyFiles = CopyViPrtX64

[StoragePort_Primary_AddReg]
HKR,,EnumPropPages32,0x00000000,","

[StoragePort_Secondary_AddReg]
HKR,,EnumPropPages32,0x00000000,","

[StoragePort_Inst_primary_x32.Services]
AddService = ViPrt, %SPSVCINST_ASSOCSERVICE%, StoragePort_Service_Inst_x32, StoragePort_EventLog_Inst_x32

[StoragePort_Inst_secondary_x32.Services]
AddService = ViPrt, %SPSVCINST_ASSOCSERVICE%, StoragePort_Service_Inst_x32, StoragePort_EventLog_Inst_x32

[StoragePort_Inst_primary_x64.Services]
AddService = ViPrtX64, %SPSVCINST_ASSOCSERVICE%, StoragePort_Service_Inst_x64, StoragePort_EventLog_Inst_x64

[StoragePort_Inst_secondary_x64.Services]
AddService = ViPrtX64, %SPSVCINST_ASSOCSERVICE%, StoragePort_Service_Inst_x64, StoragePort_EventLog_Inst_x64

[StoragePort_Service_Inst_x32]
DisplayName    = %*PNP0600.DeviceDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\ViPrt.sys
LoadOrderGroup = SCSI Miniport
AddReg         = SpecificParam

[StoragePort_Service_Inst_x64]
DisplayName    = %*PNP0600.DeviceDesc%
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\ViPrtX64.sys
LoadOrderGroup = SCSI Miniport
AddReg         = SpecificParam

[StoragePort_EventLog_Inst_x32]
AddReg = StoragePort_EventLog_AddReg_x32

[StoragePort_EventLog_Inst_x64]
AddReg = StoragePort_EventLog_AddReg_x64

[StoragePort_EventLog_AddReg_x32]
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\ViPrt.sys"
HKR,,TypesSupported,%REG_DWORD%,7

[StoragePort_EventLog_AddReg_x64]
HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\ViPrtX64.sys"
HKR,,TypesSupported,%REG_DWORD%,7

[SpecificParam]
HKR,, "Parameter0", %REG_DWORD%,0
HKR,, "Parameter1", %REG_DWORD%,5
;**********************************************************
[StorageBus_Inst_x32]
CopyFiles= CopyViPrt,CopyViBus

[StorageBus_Inst_x64]
CopyFiles= CopyViPrtX64,CopyViBusX64

[StorageBus_Inst_x32.Services]
AddService = ViPrt, 0, StoragePort_Service_Inst_x32, StoragePort_EventLog_Inst_x32
AddService = ViBus, %SPSVCINST_ASSOCSERVICE%, StorageBus_Service_Inst_x32, StoragePort_EventLog_Inst_x32

[StorageBus_Inst_x64.Services]
AddService = ViPrtX64, 0, StoragePort_Service_Inst_x64, StoragePort_EventLog_Inst_x64
AddService = ViBusX64, %SPSVCINST_ASSOCSERVICE%, StorageBus_Service_Inst_x64, StoragePort_EventLog_Inst_x64

[StorageBus_Service_Inst_x32]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\ViBus.sys
LoadOrderGroup = System Bus Extender

[StorageBus_Service_Inst_x64]
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_BOOT_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\ViBusX64.sys
LoadOrderGroup = System Bus Extender

;-------------- Coinstaller installation
[StorageBus_Inst_x32.CoInstallers]
AddReg = CoInstaller_AddReg_x32
CopyFiles = CopyCoInstX32

[StorageBus_Inst_x64.CoInstallers]
AddReg = CoInstaller_AddReg_x64
CopyFiles = CopyCoInstX64

[CoInstaller_AddReg_x32]
HKR,,CoInstallers32,0x00010000,"vIdeInst.dll,VIAIDECoInstaller"
HKR,,EnumPropPages32,0x00000000,","

[CoInstaller_AddReg_x64]
HKR,,CoInstallers32,0x00010000,"vIdeInstX64.dll,VIAIDECoInstaller"
HKR,,EnumPropPages32,0x00000000,","

;**********************************************************

[Strings]
Signature					= "{FE521DD6-102B-4c7a-BE9B-DA78CF9EE692}"
DiskName					= "VIA SATA IDE Device Driver"
VIA						= "VIA"
*PNP0600.DeviceDesc				= "VIA SATA IDE Device Driver"
VIAIDEChannel.DeviceDesc			= "VIA ATA Channel"
PCI\VEN_1106&DEV_3149&CC_0101.DeviceDesc	= "VIA Serial ATA Controller - 3149"
PCI\VEN_1106&DEV_3349&CC_0101.DeviceDesc 	= "VIA Serial ATA Controller - 3349"
PCI\VEN_1106&DEV_0581&CC_0101.DeviceDesc	= "VIA Serial ATA Controller - 0581"
PCI\VEN_1106&DEV_0591&CC_0101.DeviceDesc	= "VIA Serial ATA Controller - 0591"
PCI\VEN_1106&DEV_5287&CC_0101.DeviceDesc	= "VIA Serial ATA Controller - 5287"
PCI\VEN_1106&DEV_5324&CC_0101.DeviceDesc	= "VIA ATA/ATAPI Controller - 5324"
PCI\VEN_1106&DEV_5337&CC_0101.DeviceDesc	= "VIA Serial ATA Controller - 5337"
PCI\VEN_1106&DEV_5372&CC_0101.DeviceDesc	= "VIA Serial ATA Controller - 5372"

;*******************************************
;Handy macro substitutions (non-localizable)
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER  = 1
SERVICE_BOOT_START     = 0
SERVICE_ERROR_NORMAL   = 1
REG_EXPAND_SZ          = 0x00020000
REG_DWORD              = 0x00010001
