共用方式為


PropCopyMore

Applies to: Office 2010 | Outlook 2010 | Visual Studio

Copies a single property value from a source location to a destination location.

Header file:

Mapiutil.h

Implemented by:

MAPI

Called by:

Client applications and service providers

SCODE PropCopyMore(
  LPSPropValue lpSPropValueDest,
  LPSPropValue lpSPropValueSrc,
  ALLOCATEMORE * lpfAllocMore,
  LPVOID lpvObject
);

Parameters

  • lpSPropValueDest
    [out] Pointer to the location to which this function writes an SPropValue structure defining the copied property value.

  • lpSPropValueSrc
    [in] Pointer to the SPropValue structure that contains the property value to be copied.

  • lpfAllocMore
    [in] Pointer to the MAPIAllocateMore function to be used to allocate additional memory if the destination location is not large enough to hold the property to be copied.

  • lpvObject
    [in] Pointer to an object for which MAPIAllocateMore will allocate space if necessary.

Return Value

  • S_OK
    The single property value was copied successfully.

  • MAPI_E_NO_SUPPORT
    An unknown property type was encountered.

Remarks

A client application or service provider can use the PropCopyMore function to copy a property out of a table that is about to be freed in order to use it elsewhere.

PropCopyMore does not need to allocate memory unless the property value copied is of a type, such as PT_STRING8, that does not fit in an SPropValue structure. For these large properties, the function allocates memory using the MAPIAllocateMore function to which a pointer is passed in the lpfAllocMore parameter.

Injudicious use of PropCopyMore fragments memory; consider using the ScCopyProps function instead.