Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create an instance of an ActiveX control without
Message
From
30/09/2004 12:17:47
 
 
To
28/09/2004 11:38:03
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00946537
Message ID:
00947558
Views:
11
Sorry that I can't be of much help, Winan. You don't say *where* this is erroring out and I don't know anything about this particular control. Part of the problem also might be that you should be using COM Interop and maybe you're not? Look up COM Interop in VS Help ... there seems to be some good examples of how to do this.

~~Bonnie



>Thanks, but I did like that, I try to create instance of axsocket (catalyst socketwrench product), I met below error:
>
>An unhandled exception of type 'InvalidActiveXStateException' occurred
>in axinterop.socketwrenchctrl.dll
>
>I run below codes:
>
>Module Module1
>
>#Region "My Init Test"
> Private components As New System.ComponentModel.Container
> Public WithEvents oSocket As AxSocketWrenchCtrl.AxSocket
>#End Region
>
>
>Public Sub SocketInit()
> Dim resources As System.Resources.ResourceManager = New
>System.Resources.ResourceManager(GetType(Form1))
> oSocket = New AxSocketWrenchCtrl.AxSocket
> CType(oSocket,
>System.ComponentModel.ISupportInitialize).BeginInit()
>
> oSocket.Enabled = True
> oSocket.Name = "oSocket"
> oSocket.OcxState = CType(resources.GetObject
>("oSocket.OcxState"), System.Windows.Forms.AxHost.State)
>
> CType(oSocket,
>System.ComponentModel.ISupportInitialize).EndInit()
>
> oSocket.HostName = oSocket.LocalAddress
> oSocket.RemoteService = 16603
> oSocket.Connect()
>
> End Sub
>
>End Module
>
>
>Am I missing something?, I need advise .. many thanks in advance
>
>Regards
>Winanjaya
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform