This function puts an OLE compound document object into the running state.
At a Glance
Header file: | Ole2.h |
Windows CE versions: | 2.0 and later |
Syntax
WINOLEAPI OleRun(LPUNKNOWN pUnknown);
Parameter
pUnknown
[in] 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 Values
This function supports the standard return values E_INVALIDARG and E_UNEXPECTED, as well as the following:
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.
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.