Share via


OleRun

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

WINOLEAPI OleRun(
  LPUNKNOWN pUnknown
); 

Parameters

Return Values

The following table shows the HRESULT values that can be returned by this function.

Value Description
S_OK The object was successfully placed in the running state.
OLE_E_CLASSDIFF The source of an OLE link has been converted to a different class.
E_INVALIDARG The function has failed.
E_OUTOFMEMORY The function has failed.

Remarks

Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.

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.

**Note   **The implementation of OleRun in earlier versions of OLE differs from that described here.

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Ole2.h.
Link Library: Ole32.lib.

See Also

IUnknown | IRunnableObject | IRunnableObject::Run | Determining Supported COM APIs

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.