| 125 |
|
Alignment = 2 'Center |
| 126 |
|
Caption = "Status:" |
| 127 |
|
Height = 255 |
| 128 |
< |
Left = 120 |
| 128 |
> |
Left = 0 |
| 129 |
|
TabIndex = 2 |
| 130 |
|
Top = 1320 |
| 131 |
< |
Width = 4455 |
| 131 |
> |
Width = 4695 |
| 132 |
|
End |
| 133 |
|
End |
| 134 |
|
Attribute VB_Name = "Form1" |
| 141 |
|
Private Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPrivateProfileIntA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long |
| 142 |
|
|
| 143 |
|
Dim filterManagerHostname As String |
| 144 |
< |
Dim filterManagerTCPPort As Integer |
| 144 |
> |
Dim filterManagerTCPPort As Long |
| 145 |
|
|
| 146 |
|
Dim seqNo As Long |
| 147 |
|
Dim machineName As String |
| 170 |
|
'Form1.Caption = "i-scream Winhost " & protocolVersion & " for " & GetVersion() |
| 171 |
|
|
| 172 |
|
''''TEMP |
| 173 |
< |
filterManagerHostname = "killigrew.ukc.ac.uk" |
| 174 |
< |
filterManagerTCPPort = 4567 |
| 173 |
> |
'filterManagerHostname = "killigrew.ukc.ac.uk" |
| 174 |
> |
'filterManagerTCPPort = 4567 |
| 175 |
|
''''' END TEMP |
| 176 |
|
|
| 177 |
< |
GoTo skip |
| 177 |
> |
'GoTo skip |
| 178 |
|
On Error GoTo iniError |
| 179 |
|
Dim buf As String * 256 |
| 180 |
|
Dim length As Long |
| 181 |
< |
length = GetPrivateProfileString("i-scream Winhost", "FilterManager", "<no value>", buf, Len(buf), App.Path & "winhost.ini") |
| 181 |
> |
length = GetPrivateProfileString("i-scream Winhost", "FilterManager", "<no value>", buf, Len(buf), App.Path & "/winhost.ini") |
| 182 |
|
filterManagerHostname = Left$(buf, length) |
| 183 |
< |
length = GetPrivateProfileString("i-scream Winhost", "FilterManagerPort", "<no value>", buf, Len(buf), App.Path & "winhost.ini") |
| 184 |
< |
filterManagerTCPPort = Left$(buf, length) |
| 183 |
> |
length = GetPrivateProfileInt("i-scream Winhost", "FilterManagerPort", 0, App.Path & "/winhost.ini") |
| 184 |
> |
filterManagerTCPPort = length |
| 185 |
|
skip: |
| 186 |
|
|
| 187 |
< |
Status.Caption = "Connecting to Filter Manager" |
| 187 |
> |
Status.Caption = "Connecting to Filter Manager " & filterManagerHostname & ":" & filterManagerTCPPort |
| 188 |
|
Reconfigure_Click |
| 189 |
|
|
| 190 |
|
Form1.Show |
| 194 |
|
Exit Sub |
| 195 |
|
|
| 196 |
|
iniError: |
| 197 |
< |
x = MsgBox("The i-scream Winhost could not read the correct settings from the winhost.ini file. Please correct these and try again.", 48, "Configuration not found") |
| 197 |
> |
x = MsgBox("The i-scream Winhost could not read the correct settings from the winhost.ini file. Please correct these and try again. " & Err.Description, 48, "Configuration not found") |
| 198 |
|
End |
| 199 |
|
|
| 200 |
|
End Sub |