I'm making a little client-server VB application; so I write the server project and the client project.
Debugging and executing the application from Vb environment, doesn't give me any error...but after I've created the executable file, my c/s application doesn't work!it gives me a fatal error , and then displays this message on server application : run time error 438 (Object or property doesn't supported...etc) , and I dont' know why executing the c/s application it works, and the executable doesn't....if you have any ideas, please tell me...also if you need the code I'm using for client.
This is the code for server :
'wss = winsocket
Private Sub cmdActivate_Server()
List1.Clear
wss.RemotePort = XXXX
wss.Bind 2000, "XXX.XXX.XXX.XXX" ' this is the local machine which will work as 'server
wss.Listen
cmdActivate_Server.Enabled = False
txtServerState.Caption = "OK- waiting for client connection"
End Sub
Private Sub Exit_Click()
wss.Close
Unload Me
End Sub
Private Sub wss_Connect()
txtServerState.Caption = "Connection Enabled"
End Sub
Private Sub wss_ConnectionRequest(ByVal requestID As Long)
If wss.State <> sckClosed Then
wss.Close
End If
wss.Accept requestID
txtServerState.Caption = requestID & " connected"
End Sub
Private Sub wss_DataArrival(ByVal bytesTotal As Long)
Dim c_buffer As String
wss.GetData c_buffer, bytesTotal
List1.AddItem c_buffer
End Sub
Private Sub wss_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
txtStatoServer.Text = "Error: " & Description
End Sub
Debugging and executing the application from Vb environment, doesn't give me any error...but after I've created the executable file, my c/s application doesn't work!it gives me a fatal error , and then displays this message on server application : run time error 438 (Object or property doesn't supported...etc) , and I dont' know why executing the c/s application it works, and the executable doesn't....if you have any ideas, please tell me...also if you need the code I'm using for client.
This is the code for server :
'wss = winsocket
Private Sub cmdActivate_Server()
List1.Clear
wss.RemotePort = XXXX
wss.Bind 2000, "XXX.XXX.XXX.XXX" ' this is the local machine which will work as 'server
wss.Listen
cmdActivate_Server.Enabled = False
txtServerState.Caption = "OK- waiting for client connection"
End Sub
Private Sub Exit_Click()
wss.Close
Unload Me
End Sub
Private Sub wss_Connect()
txtServerState.Caption = "Connection Enabled"
End Sub
Private Sub wss_ConnectionRequest(ByVal requestID As Long)
If wss.State <> sckClosed Then
wss.Close
End If
wss.Accept requestID
txtServerState.Caption = requestID & " connected"
End Sub
Private Sub wss_DataArrival(ByVal bytesTotal As Long)
Dim c_buffer As String
wss.GetData c_buffer, bytesTotal
List1.AddItem c_buffer
End Sub
Private Sub wss_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
txtStatoServer.Text = "Error: " & Description
End Sub