Z
Zhou Jingxiong
Hi
I am using third party COM component which come with an installation
program (.exe file included). The program will be register to registry
automatically upon installation.
There is no problem calling the COM component from VB.net Module from
DOS Command Prompt :
Imports System
Imports Microsoft.VisualBasic
Module Module1
Sub Main()
Try
test()
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub
Sub test()
Console.WriteLine("*** Start of Testing COM component")
Dim request As Object = CreateObject("Equx.EquxRequest")
Dim res as String = request.getResult()
Console.WriteLine(res)
End Sub
End Module
From Visual Studio.net, I added Reference to Equx.tlb file
and put Imports Equx, copy+paste test() method
But the same code failed to perform after I to ASP.NET Page_Load
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error: Dim request As Object = CreateObject("Equx.EquxRequest")
If I change the above line to :
Dim request As Equx.EquxRequest = new Equx.EquxRequest
the error says that the factory can not create the object.
I am quite new in COM/VB
Please help...
I am using third party COM component which come with an installation
program (.exe file included). The program will be register to registry
automatically upon installation.
There is no problem calling the COM component from VB.net Module from
DOS Command Prompt :
Imports System
Imports Microsoft.VisualBasic
Module Module1
Sub Main()
Try
test()
Catch ex As Exception
Console.WriteLine(ex.StackTrace)
End Try
End Sub
Sub test()
Console.WriteLine("*** Start of Testing COM component")
Dim request As Object = CreateObject("Equx.EquxRequest")
Dim res as String = request.getResult()
Console.WriteLine(res)
End Sub
End Module
From Visual Studio.net, I added Reference to Equx.tlb file
and put Imports Equx, copy+paste test() method
But the same code failed to perform after I to ASP.NET Page_Load
Exception Details: System.Exception: Cannot create ActiveX component.
Source Error: Dim request As Object = CreateObject("Equx.EquxRequest")
If I change the above line to :
Dim request As Equx.EquxRequest = new Equx.EquxRequest
the error says that the factory can not create the object.
I am quite new in COM/VB
Please help...