Locks an already running object into its running state or unlocks it from its running state.
WINOLEAPI OleLockRunning(
LPUNKNOWN pUnknown, |
//Pointer to interface |
BOOL fLock, |
//Flag indicating whether object is locked |
BOOL fLastUnlockCloses |
//Flag indicating whether to close object |
); |
Parameters
Return Values
This function supports the standard return values E_INVALIDARG, E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:
Remarks
The OleLockRunning function saves you the trouble of calling the IRunnableObject::LockRunning method. You can use OleLockRunning and IRunnableObject::LockRunning interchangeably. With the IUnknown pointer passed in with the pUnknown parameter, OleLockRunning queries for an IRunnableObject pointer. If successful, it calls IRunnableObject::LockRunning and returns the results of the call.
Note The implementation of OleLockRunning in earlier versions of OLE differs from that described here.
For more information on using this function, see IRunnableObject::LockRunning.
See Also
CoLockObjectExternal, IRunnableObject::LockRunning, OleNoteObjectVisible