Click to See Complete Forum and Search --> : Returning objects from interfaces


Hussam
May 3rd, 1999, 09:55 AM
Hello!
I am implementing an ActiveX control that does a lot of work with some objects.
Those objects(or their classes)%2

chiuyan
May 3rd, 1999, 03:11 PM
you can just create a new class (with the class wizard) derived from CCmdTarget, that implements your interface, and then add a function with the class wizard (in your control's main class) that returns an LPDispatch, and have it return YourNewClass.GetIDispatch (TRUE). You can change the IDL or ODL to show the real interface you are returning (instead of just saying LDispatch).

--michael