To return an object from a property or method, the application should return a pointer to the object's implementation of the IDispatch interface. The data type of the return value should be VT_DISPATCH, or if the object does not support IDispatch, VT_UNKNOWN. The .odl file for the object should specify the name of the interface, rather than IDispatch*, as follows:
ICustom * MyMember(...) {...};
The example declares a member that returns a pointer to a custom interface named ICustom.