For 32-bit systems, dispatch functions are provided in the file Oleaut32.dll. The header file is Oleauto.h, and the import library is Oleaut32.lib. For 16-bit systems, the dispatch functions are provided in the file Oledisp.dll. The header file is Dispatch.h, and the import library is Ole2disp.lib. These functions simplify the creation of IDispatch interfaces. The dispatch functions are summarized in the following table.
Category | Function name | Purpose |
---|---|---|
Dispatch interface creation | CreateDispTypeInfo | Creates simplified type information for an object. |
CreateStdDispatch | Creates a standard IDispatch implementation for an object. | |
DispGetIDsOfNames | Converts a set of names to DISPIDs. | |
DispGetParam | Retrieves and coerces elements from a DISPPARAMS structure. | |
DispInvoke | Calls a member function of an IDispatch interface. | |
Active object initialization | GetActiveObject | Retrieves an instance of an object that is initialized with OLE. |
RegisterActiveObject | Initializes a running object with OLE. (Use when application starts.) | |
RevokeActiveObject | Revokes a running application's initialization with OLE. (Use when application ends.) |