Determines whether the object identified by this moniker is currently loaded and running.
HRESULT IsRunning(
IBindCtx *pbc, //Pointer to bind context to be used
IMoniker *pmkToLeft,
//Pointer to moniker to the left in the composite
IMoniker *pmkNewlyRunning
//Pointer to moniker of a newly running object
);
The method supports the standard return value E_UNEXPECTED, as well as the following:
If speed is important when you're requesting services from the object identified by the moniker, you may want those services only if the object is already running (because loading an object into the running state may be time-consuming). In such a situation, you'd call IMoniker::IsRunning to determine if the object is running.
For the monikers stored within linked objects, IMoniker::IsRunning is primarily called by the default handler's implementation of IOleLink::BindIfRunning.
To get a pointer to the Running Object Table (ROT), your implementation should call IBindCtx::GetRunningObjectTable on the pbc parameter. Your implementation can then call IRunningObjectTable::IsRunning to determine whether the object identified by the moniker is running. Note that the object identified by the moniker must have registered itself with the ROT when it first began running.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
IOleLink::BindIfRunning, IBindCtx::GetRunningObjectTable, IRunningObjectTable::IsRunning