共用方式為


LPSAFEARRAY_Unmarshal function

Unmarshals a SAFEARRAY object from the RPC buffer using information passed in by the LPSAFEARRAY_UserUnmarshal function.

Syntax

unsigned char* __stdcall LPSAFEARRAY_Unmarshal(
  _In_          unsigned long *pFlags,
  _Inout_       unsigned char *pBuffer,
  _In_          LPSAFEARRAY   *ppSafeArray,
  _In_    const IID           *piid
);

Parameters

pFlags [in]

The data used by RPC.

pBuffer [in, out]

The current buffer. This pointer may or may not be aligned on entry. The function aligns the buffer pointer, marshals the data, and returns the new buffer position, which is the address of the first byte after the marshaled object.

ppSafeArray [in]

Receives the safe array that contains the data.

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 one of the following.

Return code Description
S_OK
Success.
RPC_X_BAD_STUB_DATA
The stub has received bad data.
E_UNEXPECTED
The array could not be found.
E_OUTOFMEMORY
Insufficient memory for this function to perform.
DISP_E_BADCALLEE
The SAFEARRAY object does not have the correct dimensions, does not have the correct features, or memory cannot be reallocated.

Requirements

Library
OleAut32.lib
DLL
OleAut32.dll