IOpcPartSet::DeletePart method

Deletes the IOpcPart interface pointer of a specified part object from the set.

Syntax


HRESULT DeletePart(
  [in] IOpcPartUri *name
);

Parameters

name [in]

A pointer to the IOpcPartUri interface of the part URI object that represents the part name.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code/valueDescription
S_OK

The method succeeded.

E_POINTER

The name parameter is NULL.

OPC_E_NO_SUCH_PART
0x80510018

The specified part does not exist.

Package Consumption error

An HRESULT error code from the Package Consumption Error Group.

Part URI error

An HRESULT error code from the Part URI Error Group.

 

Remarks

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.

Thread Safety

Packaging objects are not thread-safe.

For more information, see the Getting Started with the Packaging API.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Msopc.h

IDL

Opcobjectmodel.idl

See also

IOpcPartSet
Overviews
Getting Started with the Packaging API
Reference
Packaging Errors
Packaging API Reference
Packaging API Samples

 

 

Community Additions

ADD
Show: