I have been debugging the following problem the better part of two days and
am finally throwing in the towel. I have a newly created .net library with
a class that throws events. I also have a ActiveX control project (project
A) in Vb6 with a few User Controls. These usercontrols are each using the
class in the .net library that throws events via the WithEvents keyword. I
have another vb6 exe project (project B) for displaying the controls in
project A (and any other project I might want to display controls from).
When I add the usercontrols directly to project B, everything works as
expected (events fire when they should, no errors, etc), so I know that I
have all the [ComSourceInterfaces] attributes set up correctly for the
classes.
However, when I put the controls back in project A and just reference them
in project B (the whole goal of the application) things don't work. Anytime
an event would fire from a method call to the .net object, the .Net object
raises an "Unknown Name" error back to the caller. I am at a loss as to why
this is. ANY insight would be useful at this point. It seems to be a bug
with the manner that vb6 is implementing Connection Points in a user
control, but I just don't know enough about this to figure out anything more
beyond this point.
Eric Wilson - 09 Sep 2003 20:56 GMT
I finally figured out the problem. Aparrently, you must provide an
implementation for every event of the .Net object in Visual Basic 6, even if
you are only interested in one.
> I have been debugging the following problem the better part of two days and
> am finally throwing in the towel. I have a newly created .net library with
[quoted text clipped - 16 lines]
> control, but I just don't know enough about this to figure out anything more
> beyond this point.