ICorDebugHeapValue2::CreateHandle 方法

为此 ICorDebugHeapValue2 对象表示的堆值创建指定类型的句柄。

Syntax

HRESULT CreateHandle (
    [in] CorDebugHandleType      type,
    [out] ICorDebugHandleValue   **ppHandle
);

参数

type [in]CorDebugHandleType 枚举的值,指定要创建的句柄的类型。

ppHandle [out]指向 ICorDebugHandleValue 对象的地址的指针,该对象表示此堆值的新句柄。

注解

句柄将在与堆值关联的应用程序域中创建,如果卸载应用程序域,该句柄将失效。

对同一堆值的此函数的多次调用将创建多个句柄。 由于句柄会影响垃圾回收器的性能,因此调试器本身应限制为相对较少的句柄(大约 256 个)。一次处于活动状态。

要求

平台: 请参阅 .NET 支持的作系统

页眉: CorDebug.idl、CorDebug.h

图书馆: CorGuids.lib

.NET 版本: 自 .NET Framework 2.0 起可用