Поделиться через


SafeArrayPtrOfIndex (Windows CE 5.0)

Send Feedback

This function retrieves a pointer to an array element.

HRESULT SafeArrayPtrOfIndex(SAFEARRAY FAR* psa,long FAR* rgIndices,void HUGEP* FAR* ppvData );

Parameters

  • psa
    Pointer to an array descriptor created by SafeArrayCreate.
  • rgIndices
    Array of index values that identify an element of the array. All indexes for the element must be specified.
  • ppvData
    On return, pointer to the void pointer to the element identified by the values in rgIndices.

Return Values

Returns the HRESULT values shown in the following table.

Value Description
S_OK Success.
E_INVALIDARG The psa parameter was not a valid safearray descriptor.
DISP_E_BADINDEX The specified index was invalid.

Remarks

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

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleauto.h.
Link Library: Oleaut32.lib.

See Also

Automation Functions | SafeArrayCreate | SafeArrayUnlock | SafeArrayLock

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.