OleLockRunning
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
pUnknown
[in] Pointer
to the IUnknown
fLock
[in] TRUE
locks the object into its running state. FALSE unlocks the object from its
running state.
fLastUnlockCloses
[in] TRUE
specifies that if the connection being released is the last external lock on
the object, the object should close. FALSE specifies that the object should
remain open until closed by the user or another process.
Return Values
This function
supports the standard return values E_INVALIDARG, E_OUTOFMEMORY and
E_UNEXPECTED, as well as the following:
S_OK
The object
was successfully locked or unlocked.
Remarks
The OleLockRunning
function saves you the trouble of calling the IRunnableObject::LockRunning
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