Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/11/2005, 01:04
bubilo
 
Fecha de Ingreso: septiembre-2005
Mensajes: 76
Antigüedad: 19 años, 7 meses
Puntos: 0
gracias por responder te doy mi codigo donde genera el error

Private Sub ws_ConnectionRequest(Index As Integer, ByVal requestID As Long)
On Error Resume Next
'DoEvents
If Index = 0 Then
sRequestID = requestID
' Vos le estas mandando un index y despues le sumas uno y lo abris
iSockets = iSockets + 1
DoEvents
Load ws(iSockets)
ws(iSockets).LocalPort = 12500
ws(iSockets).Accept requestID
'DoEvents
End If
End Sub

Private Sub ws_DataArrival(Index As Integer, ByVal bytesTotal As Long)
On Error GoTo salir
Dim i As Integer
Dim thedata As String

ws(Index).GetData thedata
'DoEvents
If thedata <> "" Then
cargarXML (thedata)
End If

Exit Sub
salir:

For i = 1 To iSockets
ws .Close
Unload ws
Next
ws .Close
ws .Listen

End Sub
Private Sub ws_Close(Index As Integer)
On Error Resume Next
If Index <> 0 Then
'Pero cuando lo borras borras el index que le mandaste cuando en realidad 'tenes que borrar el index + 1.
ws(Index).Close
Unload ws(Index)
iSockets = iSockets - 1
End If

End Sub
__________________
Buby Systems