次の方法で共有


LPSAFEARRAY_Marshal function

Marshals a SAFEARRAY object to a user's RPC buffer on the server using information passed in by the LPSAFEARRAY_UserMarshal function.

Syntax

unsigned char* __stdcall LPSAFEARRAY_Marshal(
  _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]

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

Return code Description
S_OK
Success.
E_INVALIDARG
The ppSafeArray parameter is not a valid safe array.
E_UNEXPECTED
The array could not be locked.

Requirements

Library
OleAut32.lib
DLL
OleAut32.dll