OleRun function

Puts an OLE compound document object into the running state.

Syntax

HRESULT OleRun(
  IN LPUNKNOWN pUnknown
);

Parameters

pUnknown

Pointer to the IUnknown interface on the object, with which it will query for a pointer to the IRunnableObject interface, and then call its Run method.

Return Value

This function returns S_OK on success. Other possible values include the following.

Return code Description
OLE_E_CLASSDIFF
The source of an OLE link has been converted to a different class.

Remarks

The OleRun function puts an object in the running state. The implementation of OleRun was changed in OLE 2.01 to coincide with the publication of the IRunnableObject interface. You can use OleRun and IRunnableObject::Run interchangeably. OleRun queries the object for a pointer to IRunnableObject. If successful, the function returns the results of calling the IRunnableObject::Run method.

For more information on using this function, see IRunnableObject::Run.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ole2.h
Library Ole32.lib
DLL Ole32.dll

See Also

IOleLink::BindToSource

IRunnableObject::Run