Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SafeArrayPtrOfIndex function

Gets a pointer to an array element.

Syntax


HRESULT SafeArrayPtrOfIndex(
  _In_  SAFEARRAY *psa,
  _In_  LONG      *rgIndices,
  _Out_ void      **ppvData
);

Parameters

psa [in]

An array descriptor created by SafeArrayCreate.

rgIndices [in]

An array of index values that identify an element of the array. All indexes for the element must be specified.

ppvData [out]

The array element.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

DISP_E_BADINDEX

The specified index is not valid.

E_INVALIDARG

One of the arguments is not valid.

 

Remarks

The array should be locked before SafeArrayPtrOfIndex is called. Failing to lock the array can cause unpredictable results.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

 

 

Show:
© 2016 Microsoft