.NET/COM Interop Issue

G

Guest

Hi All,

I am having a problem getting a .NET control library to "play nice" with VB6.

This particular control wraps a number of other .NET controls in the same
project. It has a number of properties and methods (but no events). I am
using both the ProgIdAttribute and a GuidAttribute, declared before the
class. I also have enabled the "Register for COM Interop" option in the
Build properties.

It compiles correctly, and appears in the registry with the ProgID and Guid
(CLSID) that I specified.

If I try to use late binding to add it to a VB6 application, I always get a
' Runtime error 336: Component not correctly registered'.

I created another, much simpler control (no public properties or methods,
and not wrapping other controls), and specified the ProgIdAttribute. This
one late-binds with no errors, and is interactive (I have a button that
changes the color of a label).

Any ideas?

Thanks,
pagates
 
N

Nicholas Paldino [.NET/C# MVP]

pagates,

By control, do you mean a visual control (and not just a class)? If
that is the case, you can't do this. .NET does not support exporting
ActiveX controls for use in automation.

Hope this helps.
 
J

j-integra_support

If your component is not a visual control, you can find step-by-step
instructions for configuring a .NET component to be accessed via COM
Interop here...

http://j-integra.intrinsyc.com/support/com/kb/article.asp?article=78813

The article talks about accessing .NET components from Java using
J-Integra, but the setup on the .NET side is the same no matter what
COM Interop client you are using.

Shane Sauer
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
high performance interop middleware for java, corba, com & .net
 

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