Compartilhar via


IDebugArrayObject::GetElement

Gets an element of the array.

HRESULT GetElement( 
   DWORD          dwIndex,
   IDebugObject** ppElement
);
int GetElement(
   [In] uint dwIndex, 
   out IDebugObject ppElement
);

Parameters

  • dwIndex
    [in] The element index.

  • ppElement
    [out] Returns an IDebugObject interface that represents the element.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

This method sees all of the elements of an array object as a one-dimensional array, even if the array object is multi-dimensional. For example, given the array myarray[3][2][6] and a dwIndex parameter of 20, this method would return the element from myarray[1][1][2], and a dwIndex parameter of 21 would return the element from myarray[1][1][3]. Use the IDebugArrayObject::GetCount method to determine the total number of elements in the array.

See Also

Reference

IDebugArrayObject