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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error trapping with a Winsock control array

Status
Not open for further replies.

Rich7638

Technical User
Apr 14, 2005
13
US
I have VB6 program talking to several remote dumb terminals via a winsock connection. I would like to setup an error event trap but so far have not been able to do so. No matter how is configure the trapping routine, the compiler returns the following error:

"Procedure does not match description of event or procedure having the same name."

I have tried:

private sub winsock1(index)_error(number ......

private sub winsock1_error(index as integer, number.......

private sub winsock1_error(number ........

There seems to be no method of getting the array element included in the trap.


 
Private Sub Winsock1_Error(Index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)

End Sub
 
Thanks Disferente, that works, although I thought I already tried that method as shown in my orginal post. Maybe I forgot the ByVal's.
 
All you should need to do is when in code view, select winsock1 from the first drop down and error from the second one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top