IOpcPartSet interface (msopc.h)

An unordered set of IOpcPart interface pointers to part objects that represent the parts in a package that are not Relationships parts.

Inheritance

The IOpcPartSet interface inherits from the IUnknown interface. IOpcPartSet also has these types of members:

Methods

The IOpcPartSet interface has these methods.

 
IOpcPartSet::CreatePart

Creates a part object that represents a part and adds a pointer to the object's IOpcPart interface to the set.
IOpcPartSet::DeletePart

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

Gets an enumerator of IOpcPart interface pointers in the set.
IOpcPartSet::GetPart

Gets a part object, which represents a specified part, in the set.
IOpcPartSet::PartExists

Gets a value that indicates whether a specified part is represented as a part object in the set.

Remarks

To retrieve the IOpcPart interface pointer of the part object that represents a specific part, call the PartExists method and pass in the part name to confirm that the part is represented in the set. If it is, call the GetPart method and pass in the part name to retrieve the IOpcPart interface pointer.

The CreatePart method cannot create a part object that represents a Relationships part.

When a package that is represented as a package object is serialized, only the parts that are represented by part objects with IOpcPart interface pointers included in the set are serialized with the package.

If a part is not represented by a part object in the set when the package is serialized, that part will not be serialized with the package.

When a part object is created and a pointer to it is added to the set, the part it represents is serialized when the package is serialized.

When an IOpcPart interface pointer is deleted from the set, the part it represents is not serialized when the package is serialized.

An IOpcPart provides access to the properties of the part. For details about these properties, see the Parts Overview and IOpcPart.

Thread Safety

Packaging objects are not thread-safe.

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

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header msopc.h

See also

Core Packaging Interfaces

Getting Started with the Packaging API

IOpcPartEnumerator

Overviews

Packaging API Reference

Packaging API Samples

Parts Overview

Reference