September 29th, 2011, 12:09 PM
Implementing a c# interface that has an event through COM
I have a VB6 class that needs to implement an interface which I created in C#. I have been able to succesfully implement all of the properties of the interface in my vb6 class over COM, but have not been able to implement the event that it has. If I understand correctly, I will need to have the equivilant of the add and remove accessors defined to regester consumers of the event, but I cannot get VB6 to accept the interface with the event defined. I am setting the InterfaceType of the class to InterfaceIsIDispatch, but still get the error "Bad interface for Implements: method has underscore in name" when I try to compile. The interface does not define any methods, and neither the properties nor the event have any underscores.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!