Platform SDK: MAPI |
The IMAPIProp::DeleteProps method deletes one or more properties.
See IMAPIProp : IUnknown.
HRESULT DeleteProps( LPSPropTagArray lpPropTagArray, LPSPropProblemArray FAR * lppProblems );
The IMAPIProps::DeleteProps method removes one or more properties from the current object.
You do not have to allow properties to be deleted from all objects. If the object is not modifiable, return MAPI_E_NO_ACCESS from DeleteProps.
You do not need to set the property type for each property tag in the property tag array pointed to by lpPropTagArray. Property types are ignored; only the property identifiers are used.
Be aware that some objects do not allow modification and that these objects return MAPI_E_NO_ACCESS from DeleteProps. Other objects allow some properties to be deleted, but not others. When there is a problem deleting only some of the properties, DeleteProps returns S_OK. If you have passed a valid pointer in the lppProblems parameter, DeleteProps will set it to an SPropProblemArray structure containing detailed information about the problems with each of the properties. For example, if you are deleting all of the properties of a message and there is a problem with one or more of its attachments, the SPropProblemArray structure will contain an entry for PR_MESSAGE_ATTACHMENTS.
The structure pointed to by lppProblems is only valid if DeleteProps returns S_OK. If DeleteProps returns an error, do not attempt to use the SPropProblemArray structure. Instead, call the object's IMAPIProp::GetLastError method to get more information about the error.
Free the returned SPropProblemArray structure by calling the MAPIFreeBuffer function.
IMAPIProp::GetProps, IMAPIProp::SaveChanges, MAPIFreeBuffer, SPropTagArray