home *** CD-ROM | disk | FTP | other *** search
- Function Main
-
- Dim strRequest As String
- Dim Response As Variant
- Dim SocketObject As Object
- Dim regexp As Object
- Dim result As Boolean
- Dim setup As Variant
- Dim connect As Variant
- Dim temp As Variant
- Dim tx(4096)
-
- setup = Array(0,0,0,46,255,83,77,66,115,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0,0,0,32,2,0,1,0,0,0,0)
- connect = Array(0,0,0,60,255,83,77,66,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,100,0,0,0,0,0,0,0,92,92,105,112,99,36,37,110,111,98,111,100,121,0,0,0,0,0,0,0,73,80,67,36)
- result = false
- For a = 1 To 4096
- tx(a)=12
- Next a
- temp = Array(0,0,161,0,255,83,77,66,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,100,0,0,0,0,208,7,12,0,208,7,12,0,0,0,0,0,0,0,0,0,0,0,208,7,67,0,12,0,20,8,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144)
- For a = 1 To 95
- tx(a) = temp(a)
- Next a
-
- ip = getparameter("ComputerIP")
- port = "139"
- cr = Chr(13) + Chr(10)
- Socket.SetTimeout 5000,5000
- Set SocketObject = Socket.OpenTCP (ip,port)
- If Not SocketObject is Nothing Then
- SocketObject.send(setup)
- Response = SocketObject.recv(1024,0)
- socketobject.send(connect)
- Response = SocketObject.recv(1024,0)
- socketobject.send(tx)
- Response = SocketObject.recv(1024,0)
- If (LBound(Response) = 1) And (UBound(Response) =0) Then
- result = true
- End If
- SocketObject.Close
- End If
- main = result
-
- End Function