C# .Net ActiveX COM Interop problem

W

WNC

I have a C# .NET program that uses COM Interop to use an ActiveX control
(the control is hosted on the main form). I have successfully used the
debug version of this program on four different computers in my office
(Win2K Server, Windows XP SP1 and Windows XP SP2). I just got a new
computer running Windows XP SP2. The same ActiveX control is installed on
all the computers, and I know it's registered. On the new computer, I get
the following error when I try to run the program:

3 System.Object ForwardCallToInvokeMember(System.String,
System.Reflection.BindingFlags, System.Object, Int32[],
System.Runtime.Remoting.Proxies.MessageData ByRef) at
System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags
flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at
TWSLib._DTws.connect(String host, Int32 port, Int32 clientId) at
AxTWSLib.AxTws.connect(String host, Int32 port, Int32 clientId) at
IB_API_IInterface.MainClass.Connect(Form1 frm) in E:\(path to the
program)\Form1.cs:line 535

I've googled this issue and found some entries, but nothing explains why
this error occurs only on this new computer. Would it help to compile a
release version and deploy that instead of the debug version? But it still
doesn't answer why this happens on only one computer, which is configured
exactly like the other WinXP machines.

Any ideas would be most appreciated.
 
A

Alvin Bruney [MVP]

First I would try re-registering the control to make sure everything is
proper. Then I would use depends.exe to examine the dependency tree for the
control. I suspect that is where your issue may lie.

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top