View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tetsuya Oguma[_3_] Tetsuya Oguma[_3_] is offline
external usenet poster
 
Posts: 7
Default Cannot get appropriate Event fired with WinSock control

Hello all,

My WinSock control (MSWINSOCK.ocx - Microsoft WinSock
Control 6.0 (SP5)) is behaving not well, to put my issue
kindly...

I am having a problem of getting Events fired after my
WinSock client control is connected to the server.

As soon as my WinSock client fires Connect method, either
Connect() or Error() Event should fire. This doesn't
simply happen... It just hangs right there...

THe snippet of my code is as follows:

With sckSocket
.Protocol = sckTCPProtocol
.RemoteHost = m_Host
.RemotePort = m_Port
.Connect
Debug.Print .State 'gives me 7 for Connected
Debug.Print .RemoteHostIP 'gives me the right IP
address of the server I want to connect to
End With

Does anyone have any idea why???

Thanks for your time.
---
Tetsuya Oguma, Sydney, Australia