Share via


ICorDebugProcess2::GetReferenceValueFromGCHandle Method

Gets a reference pointer to the specified managed object that has a garbage collection handle.

HRESULT GetReferenceValueFromGCHandle (
    [in]  UINT_PTR                 handle,
    [out] ICorDebugReferenceValue  **pOutValue
);

Parameters

  • handle
    [in] A pointer to a managed object that has a garbage collection handle. This value is a IntPtr object and can be retrieved from the GCHandle for the managed object.

  • pOutValue
    [out] A pointer to the address of an ICorDebugReferenceValue object that represents a reference to the specified managed object.

Remarks

Do not confuse the returned reference value with a garbage collection reference value.

The returned reference behaves like a normal reference. It is disabled when code execution continues after a breakpoint. The lifetime of the target object is not affected by the lifetime of the reference value.

NoteNote:

The GetReferenceValueFromGCHandle method does not validate the handle. Therefore, the GetReferenceValueFromGCHandle method can potentially corrupt both the debugger and the code being debugged if an invalid handle is passed.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorDebug.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Concepts

ICorDebugProcess2 Interface

ICorDebugProcess Interface