Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Object & Classes Trouble
turbopowerdmaxst...
post Jun 22 2006, 03:15 AM
Post #1


Premium Member
Group Icon

Group: [HOSTED]
Posts: 392
Joined: 16-February 06
From: Kolkata, India
Member No.: 11,322



The following is the code that I am testing with.

QUOTE


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'.
Go to the top of the page
 
+Quote Post
tansqrx
post Jun 26 2006, 04:14 PM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 535
Joined: 25-April 05
Member No.: 4,374



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.
Go to the top of the page
 
+Quote Post
turbopowerdmaxst...
post Jun 27 2006, 03:51 PM
Post #3


Premium Member
Group Icon

Group: [HOSTED]
Posts: 392
Joined: 16-February 06
From: Kolkata, India
Member No.: 11,322



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Multithreaded Listview Control In Different Classes Problem(3)


 



- Lo-Fi Version Time is now: 15th October 2008 - 07:10 PM