Hi all,
The following code snippet that I am using in an ActiveX DLL gives me an error and I can't figure out why.

Private WithEvents MySock as Winsock

Private Sub Class_Initialize()
'I get an error message i.e. Error in data type
Set MySock = CreateObject("MSWinsock.Winsock")
End Sub

Private Sub Class_Terminate()
Set MySock = Nothing
End Sub