Groups | Blog | Home
all groups > dotnet interop > april 2004 >

dotnet interop : AxInterop assembly works; Interop assembly doesn't???


gary NO[at]SPAM xyris.com
4/14/2004 9:16:50 AM
Hope someone can advise me.

I have an ActiveX control that works fine when dropped
on a form and accessed via the AxInterop generated assembly.

My problem is when I simply add a reference and use the control
via the automatically generated interop.XXXX assembly. ie:

XXX.XXXClass XXX1 = new XXX.XXXXClass();

results in this exception:

An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

I suspect I have to tweak the non AxInterop generated assembly but am
wondering if this is a common problem and how I should go about fixing
it.
I have access to the VC++ code that the ActiveX
control was written in (the ActiveX control works fine in a bunch
of other development environments)

Any advice would be appreciated

Tks,
v-yiy NO[at]SPAM online.microsoft.com (
4/15/2004 7:35:45 AM
Hi Gary,

I think you'd better check the HResult in the COM Exception, maybe it will
give you some idea. To get more detail info about this error, you may try
attaching your ActiveX control project to the .NET application to see why
the component returns this error code.

In addition, I'm not clear why you need to create the ActiveX control using
the COM wrapper assembly only?

Thanks!

Best regards,

Ying-Shen Yu [MSFT]
Microsoft Community Support
Get Secure! - www.microsoft.com/security

This posting is provided "AS IS" with no warranties and confers no rights.
This mail should not be replied directly, please remove the word "online"
before sending mail.
AddThis Social Bookmark Button