共用方式為


LPSAFEARRAY_Size function

Calculates the wire size of the SAFEARRAY object, and gets its handle and data needed by the LPSAFEARRAY_UserSize function.

Syntax

unsigned long __stdcall LPSAFEARRAY_Size(
  _In_       unsigned long *pFlags,
  _In_       unsigned long Offset,
  _In_       LPSAFEARRAY   *ppSafeArray,
  _In_ const IID           *piid
);

Parameters

pFlags [in]

The data used by RPC.

Offset [in]

Sets the buffer offset so that the safe array object is properly aligned when it is marshaled to the buffer.

ppSafeArray [in]

The safe array that contains the data to marshal.

piid [in]

Points to an IID for an IDispatch or IUnknown interface. Used when the members of the safe array are IDispatch or IUnknown.

Return value

The value obtained from the returned HRESULT value is S_OK.

Requirements

Library
OleAut32.lib
DLL
OleAut32.dll