ICorDebugEval2::CreateValueForType 方法

获取一个指针,该指针指向指定类型的新 ICorDebugValue(其初始值为零或 Null)。

HRESULT CreateValueForType (
    [in] ICorDebugType         *pType,
    [out] ICorDebugValue       **ppValue
);

参数

  • pType
    [in] 指向表示类型的 ICorDebugType 对象的指针。

  • ppValue
    [out] 一个指针,它指向表示该值的 ICorDebugValue 对象的地址。

备注

CreateValueForType 通过允许您指定任意对象类型(包括构造类型,如 List<int>)使 ICorDebugEval::CreateValue 通用化。 此方法的唯一用途是生成一个可以传递给函数计算的值。

类型必须是类或值类型。 不能使用此方法来创建数组值或字符串值。

要求

**平台:**请参见 .NET Framework 系统要求

头文件: CorDebug.idl、CorDebug.h

**库:**CorGuids.lib

**.NET Framework 版本:**4、3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0

请参见

参考

ICorDebugEval2 接口