;
; CDC ACM and OBEX Virtual Serial Port
;

[Version]
Signature="$WINDOWS NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
DriverVer=01/12/2011,4.3.36.3512
Provider=%PROVIDER%
CatalogFile=ips_polsat_drivers.cat

; ================= Device Install section =====================

[ips_polsat_cdc_acm]
%Dev.1A8D.2001.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2001&MI_02
%Dev.1A8D.2001.01%=DevInstall, USBCDCACM\VID_1A8D&PID_2001&MI_01
%Dev.1A8D.2003.04%=DevInstall, USBCDCACM\VID_1A8D&PID_2003&MI_04
%Dev.1A8D.2003.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2003&MI_02
%Dev.1A8D.2005.07%=DevInstall, USBCDCOBEX\VID_1A8D&PID_2005&MI_07
%Dev.1A8D.2005.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2005&MI_02

[ips_polsat_cdc_acm.NTx86]
%Dev.1A8D.2001.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2001&MI_02
%Dev.1A8D.2001.01%=DevInstall, USBCDCACM\VID_1A8D&PID_2001&MI_01
%Dev.1A8D.2003.04%=DevInstall, USBCDCACM\VID_1A8D&PID_2003&MI_04
%Dev.1A8D.2003.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2003&MI_02
%Dev.1A8D.2005.07%=DevInstall, USBCDCOBEX\VID_1A8D&PID_2005&MI_07
%Dev.1A8D.2005.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2005&MI_02

[ips_polsat_cdc_acm.NTamd64]
%Dev.1A8D.2001.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2001&MI_02
%Dev.1A8D.2001.01%=DevInstall, USBCDCACM\VID_1A8D&PID_2001&MI_01
%Dev.1A8D.2003.04%=DevInstall, USBCDCACM\VID_1A8D&PID_2003&MI_04
%Dev.1A8D.2003.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2003&MI_02
%Dev.1A8D.2005.07%=DevInstall, USBCDCOBEX\VID_1A8D&PID_2005&MI_07
%Dev.1A8D.2005.02%=DevInstall, USBCDCACM\VID_1A8D&PID_2005&MI_02



[DevInstall.NT]
CopyFiles = AcmInstall_CopyFiles
AddReg = AcmInstall_AddReg

[AcmInstall_CopyFiles]
ips_polsat_cdc_acm.sys,,,%COPYFLG_NO_VERSION_DIALOG%    ; Copy if newer

[DevInstall.NT.Services]
AddService=%cdc_acm.SvcName%, %SPSVCINST_ASSOCSERVICE%, AcmInstall_AddService 

[AcmInstall_AddService]
DisplayName     = %cdc_acm.SvcDesc%
ServiceType     = %SERVICE_KERNEL_DRIVER%
StartType       = %SERVICE_DEMAND_START%
ErrorControl    = %SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\ips_polsat_cdc_acm.sys
AddReg          = AcmInstall_AddService_AddReg

[AcmInstall_AddService_AddReg]
HKR, Parameters\Wdf, VerboseOn,       %FLG_ADDREG_TYPE_DWORD%, 0
HKR, Parameters\Wdf, VerifierOn,      %FLG_ADDREG_TYPE_DWORD%, 0
HKR, Parameters\Wdf, DbgBreakOnError, %FLG_ADDREG_TYPE_DWORD%, 0
HKR, Parameters,     DebugLevel,      %FLG_ADDREG_TYPE_DWORD%, 2
HKR, Parameters,     Provider,        %FLG_ADDREG_TYPE_SZ%,    %PROVIDER%

[DevInstall.NT.HW]
AddReg = AcmInstall_NT_HW_AddReg

[AcmInstall_NT_HW_AddReg]
HKR,,"DataInPacketsPerXfer",%FLG_ADDREG_TYPE_DWORD%,0x8 ; USB packets per single IN request
HKR,,"DataInBuffers",%FLG_ADDREG_TYPE_DWORD%,0x80 ; Number of USB IN requests to be buffered
HKR,,"CtrlDevHoldChildIfInUse",%FLG_ADDREG_TYPE_DWORD%,0x0
;HKR,,"DataOutZeroPacketEnable",%FLG_ADDREG_TYPE_DWORD%,0x01 ; Send zero packet after USB OUT
    ; when byte count is an integer multiple of max packet size


;-------------- Add standard properties page (displayed in Device Manager)
[AcmInstall_AddReg]
HKR,,PortSubClass,1,01 ; "01" stands for serial port
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"

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

[DevInstall.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[DevInstall.NT.Wdf]
KmdfService = %cdc_acm.SvcName%, cdc_acm_modem_wdfsect

[DestinationDirs]
CoInstaller_CopyFiles = 11

[SourceDisksFiles.x86]
WdfCoInstaller01009.dll=1,"\x86"

[SourceDisksFiles.amd64]
WdfCoInstaller01009.dll=1,"\amd64"

[CoInstaller_AddReg]
HKR,,CoInstallers32,%FLG_ADDREG_TYPE_MULTI_SZ%, "WdfCoInstaller01009.dll,WdfCoInstaller"

[CoInstaller_CopyFiles]
WdfCoInstaller01009.dll,,,%COPYFLG_NO_OVERWRITE%

[cdc_acm_modem_wdfsect]
KmdfLibraryVersion = 1.9

;---------------------------------------------------------------;
; Uninstall

[Uninstall]
DelFiles=AcmInstall_CopyFiles

[Uninstall.HW]
DelReg=AcmInstall_NT_HW_AddReg

[Uninstall.Services]
DelService=%cdc_acm.SvcName%,0x00000204  ;SPSVCINST_DELETEEVENTLOGENTRY||SPSVCINST_STOPSERVICE 

;---------------------------------------------------------------;

[ControlFlags]
ExcludeFromSelect=*

[Manufacturer]
%MANUFACTURER%=ips_polsat_cdc_acm,NTx86,NTamd64

[DestinationDirs]
DefaultDestDir=12

[SourceDisksNames]
; diskid = disk-description[,[tag-or-cab-file],[unused,path][,flags]]
1=%DISKID%,,,

[SourceDisksFiles.x86]
ips_polsat_cdc_acm.sys=1,"\x86"

[SourceDisksFiles.amd64]
ips_polsat_cdc_acm.sys=1,"\amd64"

;---------------------------------------------------------------;

[Strings]
PROVIDER                    = "IPS"
MANUFACTURER                = "IPS"
DISKID                      = "Cyfrowy Polsat HSPA Device Installation Disk #1"

Dev.1A8D.2001.02 = "Cyfrowy Polsat DXP Diag Port"
Dev.1A8D.2001.01 = "Cyfrowy Polsat AT1 Port"
Dev.1A8D.2003.04 = "Cyfrowy Polsat Diag Port"
Dev.1A8D.2003.02 = "Cyfrowy Polsat AT Port"
Dev.1A8D.2005.07 = "Cyfrowy Polsat Diag Port"
Dev.1A8D.2005.02 = "Cyfrowy Polsat AT Port"


cdc_acm.SvcDesc             = "Cyfrowy Polsat HSPA CDC-ACM driver"
cdc_acm.SvcName             = "ips_polsat_cdc_acm"

SPSVCINST_TAGTOFRONT                 = 0x00000001
SPSVCINST_ASSOCSERVICE               = 0x00000002
SPSVCINST_DELETEEVENTLOGENTRY        = 0x00000004
SPSVCINST_NOCLOBBER_DISPLAYNAME      = 0x00000008
SPSVCINST_NOCLOBBER_STARTTYPE        = 0x00000010
SPSVCINST_NOCLOBBER_ERRORCONTROL     = 0x00000020
SPSVCINST_NOCLOBBER_LOADORDERGROUP   = 0x00000040
SPSVCINST_NOCLOBBER_DEPENDENCIES     = 0x00000080
SPSVCINST_NOCLOBBER_DESCRIPTION      = 0x00000100
SPSVCINST_STOPSERVICE                = 0x00000200

FLG_ADDREG_KEYONLY          = 0x00000010
FLG_ADDREG_TYPE_MULTI_SZ    = 0x00010000
FLG_ADDREG_TYPE_DWORD       = 0x00010001
FLG_ADDREG_TYPE_BIN         = 0x00000001
FLG_ADDREG_TYPE_SZ          = 0x00000000
FLG_ADDREG_EXPAND_SZ        = 0x00020000

COPYFLG_WARN_IF_SKIP        = 0x00000001
COPYFLG_NOSKIP              = 0x00000002
COPYFLG_NOVERSIONCHECK      = 0x00000004
COPYFLG_FORCE_FILE_IN_USE   = 0x00000008
COPYFLG_NO_OVERWRITE        = 0x00000010
COPYFLG_NO_VERSION_DIALOG   = 0x00000020
COPYFLG_OVERWRITE_OLDER_ONLY= 0x00000040
COPYFLG_REPLACEONLY         = 0x00000400
COPYFLG_NODECOMP            = 0x00000800
COPYFLG_REPLACE_BOOT_FILE   = 0x00001000
COPYFLG_NOPRUNE             = 0x00002000
COPYFLG_IN_USE_RENAME       = 0x00004000

SERVICE_ERROR_CRITICAL        = 0x00000003
SERVICE_ERROR_IGNORE          = 0x00000000
SERVICE_ERROR_NORMAL          = 0x00000001
SERVICE_ERROR_SEVERE          = 0x00000002
SERVICE_AUTO_START            = 0x00000002
SERVICE_BOOT_START            = 0x00000000
SERVICE_DEMAND_START          = 0x00000003
SERVICE_DISABLED              = 0x00000004
SERVICE_INTERACTIVE_PROCESS   = 0x00000100
SERVICE_SYSTEM_START          = 0x00000001
SERVICE_ADAPTER               = 0x00000004
SERVICE_FILE_SYSTEM_DRIVER    = 0x00000002
SERVICE_KERNEL_DRIVER         = 0x00000001
SERVICE_RECOGNIZER_DRIVER     = 0x00000008
SERVICE_WIN32_OWN_PROCESS     = 0x00000010
SERVICE_WIN32_SHARE_PROCESS   = 0x00000020

SELECTIVE_SUSPEND_IDLE_TIMEOUT = 0x0
