These functions let you identify a running instance of an object. Because they use the OLE object table (GetRunningObjectTable), they also require either Ole32.dll (for 32-bit systems) or Ole2.dll (for 16-bit systems).
When an application is started with the /Automation switch, it should initialize its Application object as the active object by calling RegisterActiveObject after it initializes OLE.
Applications can also register other top-level objects as the active object. For example, an application that exposes a Document object may want to let ActiveX clients retrieve and modify the currently active document.
For more information about registering the active object, see Chapter 2, "Exposing ActiveX Objects." The following table identifies the location of these API functions.
Implemented by |
Used by |
Header file name |
Import library name |
---|---|---|---|
Oleaut32.dll (32-bit systems)
Ole2disp.dll |
Applications that expose or access programmable objects. | Oleauto.h Dispatch.h |
Oleaut32.lib Ole2disp.lib |