Forces an object to run.
HRESULT Run( LPBINDCTX pbc );
A pointer to the binding context of the run operation. See IBindCtx. This parameter can be NULL.
This method can return the standard return values E_INVALIDARG, E_UNEXPECTED, and S_OK.
Containers call IRunnableObject::Run to force their objects to enter the running state. If the object is not already running, calling Run can be an expensive operation, on the order of many seconds. If the object is already running, then this method has no effect on the object.IOleLink::BindToSource.
OleRun is a helper function that conveniently repackages the functionality offered by IRunnableObject::Run. With the release of OLE 2.01, the implementation of OleRun was changed so that it calls QueryInterface, asks for IRunnableObject, and then calls IRunnableObject::Run. In other words, you can use the interface and the helper function interchangeably.
An embedded object must hold a lock on its embedding container while it is in the running state. The default handler provided by OLE 2 takes care of locking the embedding container on behalf of objects implemented by an EXE object application. Objects implemented by a DLL object application must explicitly put a lock on their embedding containers, which they do by first calling IOleClientSite::GetContainer to get a pointer to the container, then calling IOleContainer::LockContainer to actually place the lock. This lock must be released when IOleObject::Close is called.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|