|
OleLockRunning
Locks an already running object into its running state or unlocks it from its
running state.
HRESULT OleLockRunning(
LPUNKNOWN pUnknown,
| //Pointer to IUnknown interface
| BOOL fLock,
| //Flag indicating whether object is locked
| BOOL fLastUnlockCloses
| //Flag indicating whether to close object
| );
|
|
Parameters
pUnknown
Points to an object's IUnknown interface in order to obtain a pointer to IRunnableObject::LockRunning.
fLock
TRUE locks the object into its running state. FALSE unlocks the object from
its running state.
fLastUnlockCloses
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
S_OK
Indicates that the object was successfully locked or unlocked.
E_OUTOFMEMORY
Out of memory.
E_INVALIDARG
Indicates one or more arguments are invalid .
E_UNEXPECTED
Indicates an unexpected error occurred.
Comments
The OleLockRunning function saves you the trouble of calling the IRunnableObject::LockRunning method. You can use OleLockRunning and IRunnableObject::LockRunning interchangeably. OleLockRunning queries for an IRunnableObject pointer. If successful, it returns the results of calling 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
CoLockObjectExternal, IRunnableObject::LockRunning, OleNoteObjectVisible
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|