Partager via


IMAPIProp::DeleteProps (Compact 7)

3/12/2014

This method deletes one or more properties.

Note

Messaging implements this method only for the IAttach and IMessage interface objects.

Syntax

HRESULT DeleteProps (
  LPSPropTagArray lpPropTagArray,
  LPSPropProblemArray FAR * lppProblems
);

Parameters

  • lpPropTagArray
    [in] Pointer to a reference to an SPropTagArray structure that is an array of property tags indicating the properties to delete. Cannot be NULL.
  • lppProblems
    [in] Ignored.

Return Value

The following table shows the possible values.

  • S_OK
    The method succeeded.
  • MAPI_W_PARTIAL_COMPLETION
    Not all properties were successfully deleted, but at least one was successfully deleted.
  • E_FAIL
    The method failed due to an unspecified error.
  • E_INVALIDARG
    The method failed because one or more of the parameters is not valid.
  • E_OUTOFMEMORY
    The method failed because it needs more memory resources.
  • E_UNEXPECTED
    The method failed due to an unexpected error.

Remarks

The cValues member of the SPropTagArray structure, to which the lpPropTagArray parameter points, must not be zero.

Property types are ignored; only the property identifiers are used. Therefore, you do not need to set the property type for each property tag in the property tag array that the lpPropTagArray parameter points to.

Some properties accept read and write operations from a file stream. Property streams must be closed before attempts are made to delete the property.

Some objects do not allow modification, and return MAPI_E_NO_ACCESS from DeleteProps. Other objects allow some properties to be deleted but not others.

When the DeleteProps method is called from an IAttach interface object, the additional conditions shown in the following code sample must be true or the call will fail:

lpPropTagArray->cValues == 1
lpPropTagArray->aulPropTag[0] == PR_ATTACH_DATA_BIN

Requirements

Header

mapidefs.h

Library

cemapi.lib

See Also

Reference

IMAPIProp
IMAPIProp::GetProps
MAPIFreeBuffer