Consulting

Results 1 to 2 of 2

Thread: Solved: Trying to code a queue manager

  1. #1

    Solved: Trying to code a queue manager

    In the following code, "InstanceNum" is an integer that I need to rotate (1,2,3,4,5,6, back to 1). This code is for a queue manager that will receive tcpip messages and distribute them to queues for various instances of a script to scoop up. I've tried Dim'ing InstanceNum and manipulating in various locations in the code but the problem is regardless of where I put it, "InstanceNum" is always empty when p_data is triggered. Any help would be appreciated, hope everyone's having a great Monday! One last note: this is being written within Boston Workstation.


    Public WithEvents p As CWinSock

    Sub cmdShutdown_Click()
    End
    End Sub
    Sub p_Data(sData As String, Index As Integer)

    txtMsg.Text = txtMsg.Text & vbCrLf & Index & ": " & sData
    FSO = CreateObject("Scripting.FileSystemObject")
    Set oFile = FSO.CreateTextFile("Y:\New\" & "instance" & InstanceNum & "\" & Format(CStr(Now), "yyy_mm_dd_hh_mm_ss") & ".txt")
    oFile.WriteLine sData
    oFile.Close

    End Sub
    Sub Start()
    Set p = New CWinSock
    Me.Caption = "Waiting for msgs on port: 40000"
    p.Listen (40000)
    Me.Show
    End Sub

  2. #2
    We figured it out, thanks anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •