Converting Existing Objects to Dual Interfaces

If you have already implemented exposed objects that support only the IDispatch interface, you should convert them to support dual interfaces. Use the following steps:

  1. Edit the .odl file to declare a dual interface instead of an IDispatch-only interface.
  2. Rearrange the parameter lists so that the methods and properties of your exposed objects return an HRESULT and pass their return values in a parameter.
  3. If your object implements an exception handler, revise your code to use the Automation error handling interface. This interface provides detailed, contextual error information through both IDispatch and VTBL interfaces.