;
; Icera Confidential. Copyright (c) 2008 Icera Inc.  http://www.icerasemi.com
; Jungo Confidential. Copyright (c) 2008 Jungo Ltd.  http://www.jungo.com
;
; CDC enumerator
;

[Version]
Signature="$WINDOWS NT$"
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
DriverVer=01/12/2011,4.3.36.3512
Provider=%PROVIDER%
CatalogFile=ips_polsat_drivers.cat

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

;---------------------------------------------------------------;
; PROFILE

[ips_polsat_dc_enum]
%Control.DeviceDesc%=CtlInstall,ROOT\ips_polsat_dc_enum_control

%Dev.1A8D.2001.02%=DevInstall, USB\VID_1A8D&PID_2001&MI_02
%Dev.1A8D.2001.00%=DevInstall, USB\VID_1A8D&PID_2001&MI_00
%Dev.1A8D.2001.01%=DevInstall, USB\VID_1A8D&PID_2001&MI_01
%Dev.1A8D.2003.06%=DevInstall, USB\VID_1A8D&PID_2003&MI_06
%Dev.1A8D.2003.04%=DevInstall, USB\VID_1A8D&PID_2003&MI_04
%Dev.1A8D.2003.00%=DevInstall, USB\VID_1A8D&PID_2003&MI_00
%Dev.1A8D.2003.02%=DevInstall, USB\VID_1A8D&PID_2003&MI_02
%Dev.1A8D.2005.04%=DevInstall, USB\VID_1A8D&PID_2005&MI_04
%Dev.1A8D.2005.07%=DevInstall, USB\VID_1A8D&PID_2005&MI_07
%Dev.1A8D.2005.00%=DevInstall, USB\VID_1A8D&PID_2005&MI_00
%Dev.1A8D.2005.02%=DevInstall, USB\VID_1A8D&PID_2005&MI_02

[ips_polsat_dc_enum.NTx86]
%Control.DeviceDesc%=CtlInstall,ROOT\ips_polsat_dc_enum_control

%Dev.1A8D.2001.02%=DevInstall, USB\VID_1A8D&PID_2001&MI_02
%Dev.1A8D.2001.00%=DevInstall, USB\VID_1A8D&PID_2001&MI_00
%Dev.1A8D.2001.01%=DevInstall, USB\VID_1A8D&PID_2001&MI_01
%Dev.1A8D.2003.06%=DevInstall, USB\VID_1A8D&PID_2003&MI_06
%Dev.1A8D.2003.04%=DevInstall, USB\VID_1A8D&PID_2003&MI_04
%Dev.1A8D.2003.00%=DevInstall, USB\VID_1A8D&PID_2003&MI_00
%Dev.1A8D.2003.02%=DevInstall, USB\VID_1A8D&PID_2003&MI_02
%Dev.1A8D.2005.04%=DevInstall, USB\VID_1A8D&PID_2005&MI_04
%Dev.1A8D.2005.07%=DevInstall, USB\VID_1A8D&PID_2005&MI_07
%Dev.1A8D.2005.00%=DevInstall, USB\VID_1A8D&PID_2005&MI_00
%Dev.1A8D.2005.02%=DevInstall, USB\VID_1A8D&PID_2005&MI_02

[ips_polsat_dc_enum.NTamd64]
%Control.DeviceDesc%=CtlInstall,ROOT\ips_polsat_dc_enum_control

%Dev.1A8D.2001.02%=DevInstall, USB\VID_1A8D&PID_2001&MI_02
%Dev.1A8D.2001.00%=DevInstall, USB\VID_1A8D&PID_2001&MI_00
%Dev.1A8D.2001.01%=DevInstall, USB\VID_1A8D&PID_2001&MI_01
%Dev.1A8D.2003.06%=DevInstall, USB\VID_1A8D&PID_2003&MI_06
%Dev.1A8D.2003.04%=DevInstall, USB\VID_1A8D&PID_2003&MI_04
%Dev.1A8D.2003.00%=DevInstall, USB\VID_1A8D&PID_2003&MI_00
%Dev.1A8D.2003.02%=DevInstall, USB\VID_1A8D&PID_2003&MI_02
%Dev.1A8D.2005.04%=DevInstall, USB\VID_1A8D&PID_2005&MI_04
%Dev.1A8D.2005.07%=DevInstall, USB\VID_1A8D&PID_2005&MI_07
%Dev.1A8D.2005.00%=DevInstall, USB\VID_1A8D&PID_2005&MI_00
%Dev.1A8D.2005.02%=DevInstall, USB\VID_1A8D&PID_2005&MI_02



;---------------------------------------------------------------;
; START Control Device

[CtlInstall.NT]
CopyFiles=dc_enum.Files.Ext

[CtlInstall.NT.Services]
AddService = %dc_enum.SvcName%, %SPSVCINST_ASSOCSERVICE%, CtlInstall.AddService,CtlInstall.EventLog

[CtlInstall.AddService]
LoadOrderGroup = Base
ServiceType    = %SERVICE_KERNEL_DRIVER%
StartType      = %SERVICE_DEMAND_START%
ErrorControl   = %SERVICE_ERROR_NORMAL%
ServiceBinary  = %12%\ips_polsat_dc_enum.sys
AddReg         = CtlInstall.AddReg

[CtlInstall.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%
HKR, Parameters, UseControlDevice,    %FLG_ADDREG_TYPE_DWORD%, 1
HKR, Parameters, DeviceName,          %FLG_ADDREG_TYPE_SZ%,    %PROVIDER% CDC Device

[CtlInstall.EventLog]
AddReg = CtlInstall.EventLog.Reg

[CtlInstall.EventLog.Reg]
HKR,, EventMessageFile, %FLG_ADDREG_EXPAND_SZ%, "%%SystemRoot%%\System32\drivers\ips_polsat_dc_enum.sys;%%SystemRoot%%\System32\IoLogMsg.dll"
HKR,, TypesSupported,   %FLG_ADDREG_TYPE_DWORD%, 7

; END Control Device
;---------------------------------------------------------------;

[DevInstall.NT]
CopyFiles=dc_enum.Files.Ext

[DevInstall.NT.Services]
AddService = %dc_enum.SvcName%, %SPSVCINST_ASSOCSERVICE%, dc_enum.AddService, dc_enum.EventLog

[DevInstall.NT.HW]
AddReg = CdcInstall_NT_HW_AddReg

; The parameters below override the standard CDC configuration.
; This override can be used to define a proprietary USB-to-serial device
; that is not compliant with CDC specification.
[CdcInstall_NT_HW_AddReg]
;HKR,,"Configuration",%FLG_ADDREG_TYPE_DWORD%,0x1  ; USB configuration to use
;HKR,,"DataInterface",%FLG_ADDREG_TYPE_DWORD%,0x1  ; Data interface
;HKR,,"DataAlternateEnable",%FLG_ADDREG_TYPE_DWORD%,0x0  ; Alternate setting that enables the data interface
;HKR,,"DataAlternateDisable",%FLG_ADDREG_TYPE_DWORD%,0x0  ; Alternate setting that disables the data interface
;HKR,,"DataInEp",%FLG_ADDREG_TYPE_DWORD%,0x81      ; Data-in endpoint address in the "enable" alt setting
;HKR,,"DataOutEp",%FLG_ADDREG_TYPE_DWORD%,0x1      ; Data-out endpoint address in the "enable" alt setting

;HKR,,"CommInterface",%FLG_ADDREG_TYPE_DWORD%,0x0  ; Communication interface (optional)
;HKR,,"NotifyEp",%FLG_ADDREG_TYPE_DWORD%,0x84      ; Notification endpoint address (optional)
HKR,,"EnableZLP",0x00010001,0x1      ; Enable zero length packet
HKR,,"IdleTimeout",%FLG_ADDREG_TYPE_DWORD%,%SELECTIVE_SUSPEND_IDLE_TIMEOUT%      ; SS Idle Timeout (optional)

; Define the device type to override definition in device descriptors (optional).
;HKR,,"DeviceClassType",0x00010001,0x0     ; See in the documentation.

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

[dc_enum.EventLog]
AddReg = dc_enum.EventLog.Reg

[dc_enum.EventLog.Reg]
HKR,, EventMessageFile, %FLG_ADDREG_EXPAND_SZ%, "%%SystemRoot%%\System32\drivers\ips_polsat_dc_enum.sys;%%SystemRoot%%\System32\IoLogMsg.dll"
HKR,, TypesSupported,   %FLG_ADDREG_TYPE_DWORD%, 7

[dc_enum.AddService]
DisplayName     = %dc_enum.SvcDesc%
ServiceType     = %SERVICE_KERNEL_DRIVER%
StartType       = %SERVICE_DEMAND_START%
ErrorControl    = %SERVICE_ERROR_NORMAL%
ServiceBinary   = %12%\ips_polsat_dc_enum.sys
AddReg          = dc_enum.AddReg

[dc_enum.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%

[dc_enum.Files.Ext]
ips_polsat_dc_enum.sys,,,0x6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK

;-------------- WDF & DC Coinstallers installation
[DevInstall.NT.CoInstallers]
AddReg=CoInstaller_AddReg
CopyFiles=CoInstaller_CopyFiles

[DevInstall.NT.Wdf]
KmdfService = %dc_enum.SvcName%, dc_enum_wdfsect

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

[CtlInstall.NT.Wdf]
KmdfService = %dc_enum.SvcName%, dc_enum_wdfsect

[DestinationDirs]
CoInstaller_CopyFiles = 11

[SourceDisksFiles.x86]
WdfCoInstaller01009.dll=1,"\x86" ; make sure the number matches with SourceDisksNames

[SourceDisksFiles.amd64]
WdfCoInstaller01009.dll=1,"\amd64" ; make sure the number matches with SourceDisksNames

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

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

[dc_enum_wdfsect]
KmdfLibraryVersion = 1.9

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

[Uninstall]
DelFiles=dc_enum.Files.Ext

[Uninstall.HW]
DelReg=CdcInstall_NT_HW_AddReg

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

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

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

[SourceDisksNames]
1=%DISKID%,

[DestinationDirs]
DefaultDestDir = 12

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

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

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

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

Dev.1A8D.2001.02 = "Cyfrowy Polsat Enumerator For DXP Diag Device"
Dev.1A8D.2001.00 = "Cyfrowy Polsat Enumerator For Device"
Dev.1A8D.2001.01 = "Cyfrowy Polsat Enumerator For AT1 Device"
Dev.1A8D.2003.06 = "Cyfrowy Polsat Enumerator For Network Device"
Dev.1A8D.2003.04 = "Cyfrowy Polsat Enumerator For Diag Device"
Dev.1A8D.2003.00 = "Cyfrowy Polsat Enumerator For Device"
Dev.1A8D.2003.02 = "Cyfrowy Polsat Enumerator For AT Device"
Dev.1A8D.2005.04 = "Cyfrowy Polsat Enumerator For Network Device"
Dev.1A8D.2005.07 = "Cyfrowy Polsat Enumerator For Diag Device"
Dev.1A8D.2005.00 = "Cyfrowy Polsat Enumerator For Device"
Dev.1A8D.2005.02 = "Cyfrowy Polsat Enumerator For AT Device"


dc_enum.SvcName             = "ips_polsat_dc_enum"
dc_enum.SvcDesc             = "Cyfrowy Polsat HSPA DC Enumerator"
Control.DeviceDesc          = "Cyfrowy Polsat HSPA DC Control"

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


