Hi,
I have a winsock control (VB6 SP5) that I'm using to connect to a server with the following lines of code:
with frmWin
.Winsock1.RemoteHost = strServer
.Winsock1.RemotePort = Val(strPort)
.Winsock1.Connect
If .Winsock1.State = 7 Then
' more code here...
return strMessage
Else
return .Winsock1.state
End If
end with
This works great in a standalone .exe (run from my desktop), but when I put it in a .dll and call it from another .exe, or from an .asp page the state is no longer 7 ("Connected to host" but 4 ("Looking up host server"
Any ideas why I'm getting this error and how to resolve it?
Thanks,
Ray
I have a winsock control (VB6 SP5) that I'm using to connect to a server with the following lines of code:
with frmWin
.Winsock1.RemoteHost = strServer
.Winsock1.RemotePort = Val(strPort)
.Winsock1.Connect
If .Winsock1.State = 7 Then
' more code here...
return strMessage
Else
return .Winsock1.state
End If
end with
This works great in a standalone .exe (run from my desktop), but when I put it in a .dll and call it from another .exe, or from an .asp page the state is no longer 7 ("Connected to host" but 4 ("Looking up host server"
Any ideas why I'm getting this error and how to resolve it?
Thanks,
Ray