Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using the mswinsock activeX component

Status
Not open for further replies.

poeijer

Programmer
May 29, 2002
69
0
0
NL
When i do:

oWinsock = CREATEOBJECT("MSWinsock.Winsock.1")
oWinsock.Protocol = 0
oWinsock.RemoteHost = "smtpserver"
oWinsock.RemotePort = 25
oWinsock.Connect

it connects withouth a problem.
and the owinsock.state is 7

but when i use the ActiveX component
and do this

with thisform
.owinsock.protocol = 0
.owinsock.remotehost = "smtpserver"
.owinsock.remoteport = 25
.owinsock.connect
endwith

it doesnt connect i still get thisform.owinsock.state is 0

anyone any ideas?
 
Try it this way:
Code:
with thisform.owinsock
   .protocol = 0
   .remotehost = "smtpserver"
   .remoteport = 25
   .OBJECT.connect()
endwith
Dave S.
[cheers]
 
That should do it for you... You could have saved me an hour yesterday, Dave... If only I had asked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top