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.
Note
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: See .NET Framework System Requirements.
Header: CorDebug.idl
Library: CorGuids.lib
.NET Framework Versions: 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0