Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function puts an OLE compound document object into the running state.

Syntax

WINOLEAPI OleRun(
  LPUNKNOWN 
pUnknown
); 

Parameters

pUnknown

[in] Pointer to the IUnknowninterface on the object, with which it will query for a pointer to the IRunnableObjectinterface, and then call its IRunnableObject::Runmethod.

Return Value

The following HRESULT values can be returned.

Value Description

S_OK

The object was placed in the running state.

OLE_E_CLASSDIFF

The source of an OLE link was converted to a different class.

E_INVALIDARG

The function failed.

E_OUTOFMEMORY

The function failed.

Remarks

Passing invalid (and under some circumstances NULL) pointers into this function causes an unexpected termination of the application.

The OleRunfunction puts an object in the running state.

The implementation of OleRunwas changed in OLE 2.01 to coincide with the publication of the IRunnableObjectinterface.

You can use OleRunand IRunnableObject::Runinterchangeably.

OleRunqueries the object for a pointer to IRunnableObject.

If successful, the function returns the results of calling the IRunnableObject::Runmethod.

The implementation of OleRunin earlier versions of OLE differs from that described here.

To determine whether the platform supports this function, see Determining Supported COM APIs.

Requirements

Header ole2.h
Library ole32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also