this is the VB code that i'm trying make
work in my HTA chat program, i'm not having
much luck...
the error's i get are:
once connected, instantly disconected
so i'm even doubtful as to if any connection
took place.
i would be very grateful if this could be
made to work
many thanks
(w1 = winsock1)
Sub Command1_Click()
If oform.Text1.value = "" Then Exit Sub
w1.SendData oform.Text1.value
DoEvents
oform.List1.AddItem "Client : " & oform.Text1.value
ofrom.Text1.value = ""
End Sub
Sub Command2_Click()
On Error Resume Next
w1.Close
w1.LocalPort = 188
w1.Listen
End Sub
Sub window_Load()
w1.LocalPort = 188
w1.Listen
End Sub
Sub w1_Close()
oform.List1.AddItem "Disconnected"
End Sub
Sub w1_ConnectionRequest()
If w1.State <> sckClosed Then w1.Close
w1.Accept requestID
oform.List1.AddItem "Connected"
End Sub
Sub w1_DataArrival(ByVal bytesTotal As Long) ' (ByVal bytesTotal As Long)
Dim dat
w1.GetData dat
oform.List1.AddItem "Client : " & dat
End Sub
Quote:
> By all means, post the error and the code where it comes from. That's why
we're
> here...
> --
> Please respond in the newsgroup so everyone may benefit.
> http://dev.remotenetworktechnology.com
> (email requests for support contract information welcomed)
> ----------
> Subscribe to Microsoft's Security Bulletins:
> http://www.microsoft.com/technet/security/bulletin/notify.asp
> > thanks
> > it's just that i was getting strange error messages
> > and i do have the correct licence to use these controls
> > (it cost me enough) but it's worth it, so no complaints
> > the fault must lie within my code then, so what's new :-(
> > i'm afraid to post my code, because people don't
> > like client and server applications, but i still need help
> > is their someone willing to help me complete my HTA
> > Beris
> > > > If you have a licensed Winsock control, sure.
> > > > Winsock programming is complicated and is reallya function of how it
> > works, not
> > > > VBScript. Most VB examples should work as long as they are
converted to
> > > > loosely-typed, late-bound code. You can find the prior discussions
of
> > WInsock
> > > > scripting in the scripting newsgroups here:
http://groups.google.com/groups?as_q=Winsock&as_ugroup=microsoft.publ...
Quote:
> > pting.*
> > > And from a previous post by you :-)
> > > <quote>
> > > Monte Hansen wrote a free DLL which can be used as a replacement for
the
> > > licensed Winsock. You can download it from:
> > > http://www.killervb.com/WinsockLib.aspx
> > > You need to make only minor modifications to scripts which would
depend on
> > the
> > > Microsoft Winsock control; I haven't mastered use of it myself yet,
but it
> > > "feels" even more lightweight than the MS Winsock from my light usage.
> > > </quote>
> > > --
> > > torgeir
> > > Microsoft MVP Scripting and WMI, Porsgrunn Norway
> > > Administration scripting examples and an ONLINE version of the 1328
page
> > Scripting
> > > Guide: http://www.microsoft.com/technet/scriptcenter