Hi all!
I'm having some weird behaviour in a .NET application i'm developing.
I'll try to explain:
I've created a Class that wraps an asynchronous socket.
When connect callback is called, i raise a class event :
' Create socket
sock = New Socket(AddressFamily.InterNetwork, _
SocketType.Stream, ProtocolType.Tcp)
' Launch connection
sock.BeginConnect(EP, AddressOf ConnectCallback, Nothing)
End Sub
Private Sub ConnectCallback(ByVal ar As IAsyncResult)
'MsgBox("ConnectCallback called")
If Not sock.Connected Then
sock.Close()
sock = Nothing
RaiseEvent Disconnected()
Exit Sub
End If
sock.EndConnect(ar)
MsgBox("After EndConnect")
RaiseEvent Connected()
'MsgBox("After RaiseEvent")
' Start reception ...
It works fine on my PC, having installed Visual Studio 2003 (7.1.3088)
and .NET framework 1.1.4322 SP1
My problem is that when i deploy this application to other PC's that
dont have VisualStudio installed, the program hangs at the RaiseEvent
call (that is "After EndConnect" box is shown, "After RaiseEvent" box
is not), and the event handler (which has also another MsgBox as the
first command in the sub) isnt called either.
I've checked that they already have .NET framework 1.1.4322 SP1
installed, but i cant make it to work.
Any ideas?
Thanks a Lot,
Guille.