IOpcPartSet::DeletePart method (msopc.h)
Deletes the IOpcPart interface pointer of a specified part object from the set.
HRESULT DeletePart( [in] IOpcPartUri *name );
A pointer to the IOpcPartUri interface of the part URI object that represents the part name.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||The method succeeded.|
||The name parameter is NULL.|
||The specified part does not exist.|
||An HRESULT error code from the Package Consumption Error Group.|
||An HRESULT error code from the Part URI Error Group.|
When an IOpcPart interface pointer is deleted from the set, the part it represents is not serialized when the package is serialized. Additionally, if the represented part is the source of one or more relationships, those relationships are not saved with the package when the package object is written.
The data contained in a deleted part object is accessible until the package object that contains the deleted part object is released. Additionally, a Relationship whose source is the part that is represented by the deleted part object also remains accessible until the package object that contains the deleted part object is released. However, these relationships will not be saved when the package is saved.
Packaging objects are not thread-safe.
For more information, see the Getting Started with the Packaging API.
|Minimum supported client||Windows 7 [desktop apps only]|
|Minimum supported server||Windows Server 2008 R2 [desktop apps only]|