Share via


IDebugArrayObject::GetCount

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the count of elements in the array.

Syntax

HRESULT GetCount( 
   DWORD* pdwElements
);
int GetCount(
   out uint pdwElements
);

Parameters

pdwElements
[out] Returns the count.

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], this method would return 36 in the pdwElements parameter. Use the GetElement method to retrieve the individual elements one at a time.

See also