ICorDebugAppDomain2::GetArrayOrPointerType 方法

获取指定类型的数组、或一个指向指定类型的指针或对指定类型的引用。

HRESULT GetArrayOrPointerType (
    [in]  CorElementType    elementType,
    [in]  ULONG32           nRank,
    [in]  ICorDebugType     *pTypeArg,
    [out] ICorDebugType     **ppType
);

参数

  • elementType
    [in] 一个指定要创建的基础本机类型(数组、指针或引用)的 CorElementType 枚举值。

  • nRank
    [in] 数组的秩(即维数)。 如果 elementType 指定一个指针或引用类型,则该值必须为 0。

  • pTypeArg
    [in] 一个指向 ICorDebugType 对象的指针,该对象表示要创建的数组、指针或引用的类型。

  • ppType
    [out] 一个指向 ICorDebugType 对象地址的指针,该对象表示构造的数组、指针类型或引用类型。

备注

elementType 的值必须为以下其中之一:

  • ELEMENT_TYPE_PTR

  • ELEMENT_TYPE_BYREF

  • ELEMENT_TYPE_ARRAY 或 ELEMENT_TYPE_SZARRAY

如果 elementType 的值为 ELEMENT_TYPE_PTR 或 ELEMENT_TYPE_BYREF,则 nRank 必须为零。

要求

**平台:**请参见 .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

请参见

参考

ICorDebugAppDomain2 接口