Afternoon everyone...
I'm writing a class in VB2005, and I want to expose various methods and events back to a VB6 client.
The approach I've taken is to define an interface for the properties and methods of my class - and then implemented this interface using my class. Additionally, I've created an Interface for the Events my class exposes, and implemented those with my class as well...
If my class uses the <ComClass()> attribute, my methods and properties are exposed to COM. If it uses the <COMSourceInterfaces()> attribute to point to the Events interface, the events are exposed to COM, but the methods aren't. I seems I can't use both interfaces...
I have noticed that I can use one of the overloaded constructos of the <ComClass()> attribute to set up my interfaces using their GUIDs, but these have to be constants. This causes me problems, owing to the way my employer does things in terms of releasing versions.
Anyone got any ideas?
Martin.
I'm writing a class in VB2005, and I want to expose various methods and events back to a VB6 client.
The approach I've taken is to define an interface for the properties and methods of my class - and then implemented this interface using my class. Additionally, I've created an Interface for the Events my class exposes, and implemented those with my class as well...
If my class uses the <ComClass()> attribute, my methods and properties are exposed to COM. If it uses the <COMSourceInterfaces()> attribute to point to the Events interface, the events are exposed to COM, but the methods aren't. I seems I can't use both interfaces...
I have noticed that I can use one of the overloaded constructos of the <ComClass()> attribute to set up my interfaces using their GUIDs, but these have to be constants. This causes me problems, owing to the way my employer does things in terms of releasing versions.
Anyone got any ideas?
Martin.