Skip to content

Latest commit

 

History

History
79 lines (55 loc) · 2.4 KB

icordebugheapvalue3-getthreadowningmonitorlock-method.md

File metadata and controls

79 lines (55 loc) · 2.4 KB
description title ms.date api_name api_location api_type f1_keywords helpviewer_keywords ms.assetid topic_type
Learn more about: ICorDebugHeapValue3::GetThreadOwningMonitorLock Method
ICorDebugHeapValue3::GetThreadOwningMonitorLock Method
03/30/2017
ICorDebugHeapValue3.GetThreadOwningMonitorLock
mscordbi.dll
COM
ICorDebugHeapValue3::GetThreadOwningMonitorLock
GetThreadOwningMonitorLock method [.NET Framework debugging]
ICorDebugHeapValue3::GetThreadOwningMonitorLock method [.NET Framework debugging]
e06fc19d-2cf4-4cad-81a3-137a68af8969
apiref

ICorDebugHeapValue3::GetThreadOwningMonitorLock Method

Returns the managed thread that owns the monitor lock on this object.

Syntax

HRESULT GetThreadOwningMonitorLock (  
    [out] ICorDebugThread   **ppThread,  
    [out] DWORD              *pAcquisitionCount  
);  

Parameters

ppThread
[out] The managed thread that owns the monitor lock on this object.

pAcquisitionCount
[out] The number of times this thread would have to release the lock before it returns to being unowned.

Return Value

This method returns the following specific HRESULTs as well as HRESULT errors that indicate method failure.

HRESULT Description
S_OK The method completed successfully.
S_FALSE No managed thread owns the monitor lock on this object.

Exceptions

Remarks

If a managed thread owns the monitor lock on this object:

  • The method returns S_OK.

  • The thread object is valid until the thread exits.

If no managed thread owns the monitor lock on this object, ppThread and pAcquisitionCount are unchanged, and the method returns S_FALSE.

If ppThread or pAcquisitionCount is not a valid pointer, the result is undefined.

If an error occurs such that it cannot be determined which, if any, thread owns the monitor lock on this object, the method returns an HRESULT that indicates failure.

Requirements

Platforms: See System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: [!INCLUDEnet_current_v40plus]

See also