VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form frmMain 
   BackColor       =   &H00404040&
   BorderStyle     =   0  'None
   Caption         =   "Neuron Client"
   ClientHeight    =   4110
   ClientLeft      =   6570
   ClientTop       =   6075
   ClientWidth     =   3630
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   274
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   242
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin MSComctlLib.ImageList imlAnim 
      Left            =   1575
      Top             =   1800
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   30
      ImageHeight     =   30
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   33
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1242
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1D5C
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":2876
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3390
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":3EAA
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":49C4
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":54DE
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":5FF8
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":6B12
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":762C
            Key             =   ""
         EndProperty
         BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":8146
            Key             =   ""
         EndProperty
         BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":8C60
            Key             =   ""
         EndProperty
         BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":977A
            Key             =   ""
         EndProperty
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":A294
            Key             =   ""
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":ADAE
            Key             =   ""
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":B8C8
            Key             =   ""
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":C3E2
            Key             =   ""
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":CEFC
            Key             =   ""
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":DA16
            Key             =   ""
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":E530
            Key             =   ""
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":F04A
            Key             =   ""
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":FB64
            Key             =   ""
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1067E
            Key             =   ""
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":11198
            Key             =   ""
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":11CB2
            Key             =   ""
         EndProperty
         BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":127CC
            Key             =   ""
         EndProperty
         BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":132E6
            Key             =   ""
         EndProperty
         BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":13E00
            Key             =   ""
         EndProperty
         BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1491A
            Key             =   ""
         EndProperty
         BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":15434
            Key             =   ""
         EndProperty
         BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":15F4E
            Key             =   ""
         EndProperty
         BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":16A68
            Key             =   ""
         EndProperty
         BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":17582
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin Synapsis.MicroHeader mchMain 
      Height          =   255
      Left            =   0
      TabIndex        =   13
      Top             =   465
      Width           =   3615
      _ExtentX        =   6376
      _ExtentY        =   450
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "SYNAPSIS© CORTEX SERVER"
      UseIcons        =   0   'False
   End
   Begin Synapsis.MicroFooter mftMain 
      Align           =   2  'Align Bottom
      Height          =   195
      Left            =   0
      TabIndex        =   8
      Top             =   3915
      Width           =   3630
      _ExtentX        =   6403
      _ExtentY        =   344
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   ""
      UseIcons        =   0   'False
   End
   Begin Synapsis.ChainCopy ccpClient 
      Height          =   1215
      Left            =   135
      TabIndex        =   6
      Top             =   4140
      Visible         =   0   'False
      Width           =   3345
      _ExtentX        =   5900
      _ExtentY        =   2143
      ForeColor       =   16777215
      InboundPort     =   11000
      RemotePort      =   11010
      BackColor       =   4210752
   End
   Begin VB.TextBox txtBogusFocus 
      Height          =   285
      Left            =   4365
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   45
      Width           =   510
   End
   Begin VB.Timer tmrFocus 
      Enabled         =   0   'False
      Interval        =   50
      Left            =   4365
      Top             =   810
   End
   Begin VB.Timer tmrAnim 
      Enabled         =   0   'False
      Interval        =   60
      Left            =   4365
      Top             =   360
   End
   Begin MSWinsockLib.Winsock wskPort 
      Left            =   4365
      Top             =   1260
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
      Protocol        =   1
      LocalPort       =   81
   End
   Begin Synapsis.MicroFooter mftDeco 
      Height          =   195
      Index           =   2
      Left            =   0
      TabIndex        =   9
      Top             =   3105
      Width           =   3600
      _ExtentX        =   6350
      _ExtentY        =   344
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   12632256
      Caption         =   "APPLICATION"
      UseIcons        =   0   'False
   End
   Begin Synapsis.MicroFooter mftDeco 
      Height          =   195
      Index           =   1
      Left            =   0
      TabIndex        =   10
      Top             =   1035
      Width           =   3600
      _ExtentX        =   6350
      _ExtentY        =   344
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   12632256
      Caption         =   "USER"
      UseIcons        =   0   'False
   End
   Begin Synapsis.MicroFooter mftDeco 
      Height          =   195
      Index           =   3
      Left            =   0
      TabIndex        =   11
      Top             =   2430
      Width           =   3600
      _ExtentX        =   6350
      _ExtentY        =   344
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   12632256
      Caption         =   "MACHINE"
      UseIcons        =   0   'False
   End
   Begin Synapsis.MicroFooter mftDeco 
      Height          =   195
      Index           =   4
      Left            =   0
      TabIndex        =   12
      Top             =   3915
      Width           =   3600
      _ExtentX        =   6350
      _ExtentY        =   344
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Small Fonts"
         Size            =   6.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   12632256
      Caption         =   "FILE SYNC"
      UseIcons        =   0   'False
   End
   Begin VB.Image imgPic 
      Height          =   450
      Left            =   1905
      Picture         =   "frmMain.frx":1809C
      Top             =   15
      Width           =   450
   End
   Begin VB.Label lblData 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackColor       =   &H00303030&
      BackStyle       =   0  'Transparent
      Caption         =   "dados"
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   150
      Index           =   5
      Left            =   3150
      TabIndex        =   7
      Top             =   45
      Width           =   345
   End
   Begin VB.Image imgHeader 
      Height          =   480
      Left            =   0
      Picture         =   "frmMain.frx":18BA6
      Top             =   0
      Width           =   4170
   End
   Begin VB.Label lblData 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00303030&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C0C0C0&
      Height          =   150
      Index           =   4
      Left            =   570
      TabIndex        =   5
      Top             =   2655
      Width           =   2955
      WordWrap        =   -1  'True
   End
   Begin VB.Label lblData 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00303030&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Small Fonts"
         Size            =   6
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   510
      Index           =   3
      Left            =   -60
      TabIndex        =   4
      Top             =   3330
      Width           =   3585
      WordWrap        =   -1  'True
   End
   Begin VB.Label lblData 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackColor       =   &H00303030&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C0C0C0&
      Height          =   240
      Index           =   2
      Left            =   3465
      TabIndex        =   3
      Top             =   2790
      Width           =   60
   End
   Begin VB.Label lblData 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackColor       =   &H00303030&
      BackStyle       =   0  'Transparent
      Caption         =   "Waiting..."
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   1140
      Index           =   1
      Left            =   2610
      TabIndex        =   1
      Top             =   1260
      Width           =   915
   End
   Begin VB.Label lblData 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackColor       =   &H00303030&
      BackStyle       =   0  'Transparent
      Caption         =   "Guessing..."
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   240
      Index           =   0
      Left            =   2490
      TabIndex        =   0
      Top             =   720
      Width           =   1035
   End
   Begin VB.Image imgBG 
      Height          =   7500
      Left            =   0
      Picture         =   "frmMain.frx":1F468
      Stretch         =   -1  'True
      Top             =   -135
      Width           =   645
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Type LUID: UsedPart As Long: IgnoredForNowHigh32BitPart As Long: End Type
Private Type TOKEN_PRIVILEGES: PrivilegeCount As Long: TheLuid As LUID: Attributes As Long: End Type

Private Const EWX_SHUTDOWN As Long = 1
Private Const EWX_FORCE As Long = 4
Private Const EWX_REBOOT = 2
Private Const TOKEN_ADJUST_PRIVILEGES = &H20
Private Const TOKEN_QUERY = &H8
Private Const SE_PRIVILEGE_ENABLED = &H2

Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function OpenProcessToken Lib "advapi32" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long
Private Declare Function LookupPrivilegeValue Lib "advapi32" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As String, ByVal lpName As String, lpLuid As LUID) As Long
Private Declare Function AdjustTokenPrivileges Lib "advapi32" (ByVal TokenHandle As Long, ByVal DisableAllPrivileges As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long
Public Function DecimalValue(BinaryByte As String) As Integer
On Error GoTo pfDecimalValueErr 'EHCG.UID.pfDecimalValue

'   This routine is called from the GetWindowsVersion routine

    Dim X As Integer
    Dim v As Integer
    Dim tmpVal As Integer

    v = 128
    For X = 1 To 8
        If Mid$(BinaryByte, X, 1) = "1" Then tmpVal = tmpVal + v
        v = v / 2
    Next X
    DecimalValue = tmpVal

Exit Function
pfDecimalValueErr:
Err.Raise Err.number, Err.Source, "pf.DecimalValue (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Function
Public Sub CloseWindows()
On Error GoTo psCloseWindowsErr 'EHCG.UID.psCloseWindows

ExitWindows EWX_LOGOFF, &HFFFFFFFF

Exit Sub
psCloseWindowsErr:
Err.Raise Err.number, Err.Source, "ps.CloseWindows (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Sub
Private Sub ccpClient_TransferEnd()
Me.ccpClient.Visible = False
Me.Height = 274 * Screen.TwipsPerPixelY
Data.TempStatus = 0
End Sub
Private Sub ccpClient_TransferStart()
Me.ccpClient.Visible = True
Me.Height = 375 * Screen.TwipsPerPixelY
Data.TempStatus = 2
SendPong
End Sub

Private Sub Form_Load()
On Error GoTo psForm_LoadErr 'EHCG.UID.psForm_Load
Dim llTickCount  As Long

Me.Caption = App.Title & " " & Format$(App.Major, "00") & "." & Format$(App.Minor, "00") & " R" & App.Revision & " © " & App.LegalCopyright

Me.lblData(5) = App.Title & " " & Format$(App.Major, "00") & "." & Format$(App.Minor, "00") & " R" & App.Revision
App.TaskVisible = False

CenterForm Me, , True
Me.Left = Screen.Width - Me.Width
Me.Top = 0
frmMain.Height = 274 * 15
Me.Height = 274 * Screen.TwipsPerPixelY
Me.imgBG.Width = Me.ScaleWidth

Me.imgPic.Picture = Me.imlAnim.ListImages(1).Picture
Me.wskPort.Bind 81


llTickCount = GetTickCount

Me.lblData(1) = "Waiting Network configuration..."
Me.Visible = True

    Do
    DoEvents
    
        If Me.wskPort.LocalIP <> "127.0.0.1" Then Exit Do
    
    Loop

    Do
    Data.MACAddress = GetMACAddress

        If Data.MACAddress <> "" Then Exit Do

    DoEvents

    Loop

Me.lblData(1) = "Waiting..."

SendBroadcast "STARTUP"

Me.lblData(2) = Me.wskPort.LocalHostName
Me.lblData(4) = Data.MACAddress

Data.Status = 4
SendBroadcast "SERVERINFO"



Exit Sub
psForm_LoadErr:
ErrH "FRMMain.FormLoad", "Neuron", , False
Resume Next
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error GoTo psForm_QueryUnloadErr 'EHCG.UID.psForm_QueryUnload

Call AppRestart

Exit Sub
psForm_QueryUnloadErr:
Err.Raise Err.number, Err.Source, "ps.Form_QueryUnload (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Sub
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo psForm_UnloadErr 'EHCG.UID.psForm_Unload

ClipMouseToWindow

    If Data.ServerIP <> "" Then
    Data.Status = 1
    SendPong
    End If

Exit Sub
psForm_UnloadErr:
Err.Raise Err.number, Err.Source, "ps.Form_Unload (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Sub
Private Sub imgHeader_Click()
Drag Me
End Sub

Private Sub tmrAnim_Timer()
On Error GoTo pstmrAnim_TimerErr 'EHCG.UID.pstmrAnim_Timer
Dim uSE As ScheduleEvent


Set Me.imgPic.Picture = Me.imlAnim.ListImages(Data.AnimFrame + 2).Picture
Data.AnimFrame = (Data.AnimFrame + 1) Mod 32

    For Each uSE In Data.Schedules
    
        If GetTickCount > uSE.LastExec + uSE.Interval Then
        uSE.LastExec = GetTickCount
        ParseServerInput "LocalSchedule", Data.ServerIP, Data.ServerIP, uSE.Command
        End If
    
    Next uSE

Exit Sub
pstmrAnim_TimerErr:
Err.Raise Err.number, Err.Source, "ps.tmrAnim_Timer (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Sub
Private Sub tmrFocus_Timer()
On Error GoTo pstmrFocus_TimerErr 'EHCG.UID.pstmrFocus_Timer

Me.ZOrder 0
SendKeys "{ESC}", True
Me.txtBogusFocus = ""
Me.txtBogusFocus.SetFocus
ClipMouseToWindow Me.hwnd
frmLock.Width = 50000
frmLock.Height = 50000

Exit Sub
pstmrFocus_TimerErr:
Err.Raise Err.number, Err.Source, "ps.tmrFocus_Timer (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Sub
Private Sub wskPort_DataArrival(ByVal bytesTotal As Long)
'On Error GoTo pswskPort_DataArrivalErr 'EHCG.UID.pswskPort_DataArrival
On Error Resume Next

Dim lsCommBuffer As String

Me.wskPort.GetData lsCommBuffer, , bytesTotal

Data.CommBuffer = Data.CommBuffer & lsCommBuffer

Call ProccessBuffer

Exit Sub
pswskPort_DataArrivalErr:
Err.Raise Err.number, Err.Source, "ps.wskPort_DataArrival (" & Err.number & ": " & Err.Description & ")", Err.HelpFile, Err.HelpContext

End Sub
