471,627 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

.NET/COM Interop Issue

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
Jan 3 '06 #1
2 1325
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"pagates" <pa*****@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
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

Jan 4 '06 #2
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/suppo...?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

Jan 4 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Sudha | last post: by
8 posts views Thread by Rob Edwards | last post: by
2 posts views Thread by Jas Manghera | last post: by
2 posts views Thread by Christopher H. Laco | last post: by
5 posts views Thread by Yoavo | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.