; oemportamd64.inf
; Copyright (c) 2012-2018 Maerzhaeuser Wetzlar
;
; INF file to specify another PNP ID for serial ports
;

[version]
signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%OEM%
DriverVer=10/19/2018,9.9.2.4
CatalogFile=vista64oem.cat

[DestinationDirs]
ComPort.OEM.Copy = 12
ComPort.OEM.NT.PropPageCopy = 11
ComPort.OEM.CoInstallerCopy = 11

[ControlFlags]
ExcludeFromSelect=*

; Drivers
;----------------------------------------------------------
[Manufacturer]
%OEM%=OEM, ntamd64

[OEM.ntamd64]
%OEMPNP0501.DeviceDesc% = ComPort.OEM, OEMPORT ; Communications Port

[ComPort.OEM]
; NT install section, redirect
; we also need to add this for benefit of Ports class
AddReg=ComPort.OEM.AddReg, ComPort.OEM.NT.AddReg
CopyFiles=ComPort.OEM.Copy, ComPort.OEM.NT.PropPageCopy

; addreg and copy files for PnP serenum.sys
Include=msports.inf
Needs=SerialEnumerator

[ComPort.OEM.AddReg]
; Let Ports class know this is a serial port
HKR,,PortSubClass,1,01

[ComPort.OEM.NT.AddReg]
HKR,,EnumPropPages32,,"xrpciports.dll,SerialPortPropPageProvider"

[ComPort.OEM.Copy]
ser15x.sys

[ComPort.OEM.NT.PropPageCopy]
xrpciports.dll

[ComPort.OEM.HW.AddReg]
HKR,,UpperFilters,0x00010000,serenum

[ComPort.OEM.HW]
AddReg=ComPort.OEM.HW.AddReg

[ComPort.OEM.Services]
AddService = Ser15x, 0x00000002, Ser15x_Service_Inst, Ser15x_EventLog_Inst

; install the serenum service itself
Include=msports.inf
Needs=SerialEnumerator.Services

; -------------- Serial Port Driver install sections
[Ser15x_Service_Inst]
DisplayName    = %Ser15x.SVCDESC%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 0               ; SERVICE_ERROR_IGNORE
ServiceBinary  = %12%\ser15x.sys
LoadOrderGroup = Extended base

[Ser15x_EventLog_Inst]
AddReg = Ser15x_EventLog_AddReg

[Ser15x_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%%SystemRoot%%\System32\IoLogMsg.dll;%%SystemRoot%%\System32\drivers\ser15x.sys"
HKR,,TypesSupported,0x00010001,7

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

[SourceDisksFiles]
ser15x.sys = 1,,
xrpciports.dll = 1,,
ser15xco.dll = 1,,

; Coinstaller section
;----------------------------------------------------------
[ComPort.OEM.CoInstallers]
CopyFiles = ComPort.OEM.CoInstallerCopy
AddReg = ComPort.OEM.NT.CoInstallers_AddReg
 
[ComPort.OEM.CoInstallerCopy]
ser15xco.dll
 
[ComPort.OEM.NT.CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000, "ser15xco.dll, Ser15xCoInstaller"

; User readable strings
;----------------------------------------------------------
[Strings]
OEM                   = "Maerzhaeuser Wetzlar GmbH & Co. KG"
OEMPNP0501.DeviceDesc = "Tango PCI-S Port"
Ser15x.SVCDESC        = "Tango PCI_S Port 64Bit Driver"
DiskId1               = "Tango-CD"