次の方法で共有


SafeArrayPtrOfIndex (Windows Embedded CE 6.0)

1/6/2010

This function retrieves a pointer to an array element.

Syntax

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

Parameters

  • 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 Value

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

Header oleauto.h
Library oleaut32.lib
Windows Embedded CE Windows CE 2.0 and later

See Also

Reference

Automation Functions
SafeArrayCreate
SafeArrayUnlock
SafeArrayLock