turbopowerdmaxsteel 0 Report post Posted June 22, 2006 The following is the code that I am testing with. Public Class Form1 Private sckCom As New MSWinsockLib.Winsock Private sckDat As New AxMSWinsockLib.AxWinsock Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load sckCom.Close() sckDat.Close() End Sub End Class The sckCom.close() method works fine, but the sckDat.close() method causes the following exception :- Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown. I am not sure why this error is being generated. Also what are the differences betweem the two class libraries 'MSWinsockLib' & 'AxMSWinsockLib'. Share this post Link to post Share on other sites
tansqrx 0 Report post Posted June 26, 2006 If you are using .NET then I would highly suggest researching the System.Net namespace, specifically the socket class. If you are using VB6 then I would highly suggest downloading a free copy of VB.NET Express from Microsoft. It will make your life much easier.I will additionally make the suggestion that unless you are performing some low level protocol handling, you should use something like httpWebRequest. I have done very little with VB6 but I know that in .NET you still have to make all of your DLL imports. Tell us a little bit more about what you are trying to do and maybe I can make some more suggestions. Share this post Link to post Share on other sites
turbopowerdmaxsteel 0 Report post Posted June 27, 2006 Actually, I am trying to create a Download Manager (infact I have a sound working one). I want to make a class FTP Engine, which would do all the low level handlings and enable file downloads. For this I have delcated the following objects :- Dim WithEvents FTP0 As New FTPEngine Dim WithEvents FTP1 As New FTPEngine Dim WithEvents FTP2 As New FTPEngine Dim WithEvents FTP3 As New FTPEngine The problem I am facing, is the exception that I mentioned, being genereated whenever I try to Call Methods or Functions of an object of AxMSWinsockLib class. However, working with MSWinsockLib class, seems to be working. Share this post Link to post Share on other sites