IOpcPackage interface
Represents a package and provides methods to access the package's parts and relationships.
When to implement
Never. Custom implementations of this interface are not supported.
Members
The IOpcPackage interface inherits from the IUnknown interface. IOpcPackage also has these types of members:
Methods
The IOpcPackage interface has these methods.
| Method | Description |
|---|---|
| GetPartSet |
Gets a part set object that contains IOpcPart interface pointers. |
| GetRelationshipSet |
Gets a relationship set object that represents the Relationships part that stores package relationships. |
Remarks
To get a pointer to this interface, call either the IOpcFactory::CreatePackage or IOpcFactory::ReadPackageFromStream method.
Package relationships serve as an entry point to the package by links from the package to target resources. The target of a package relationship is often an important part described in the ECMA-376 OpenXML, 1st Edition, Part 2: Open Packaging Conventions (OPC) or by the package format designer.
For example, a package relationship can provide access to the Core Properties part that stores package metadata, or to a part containing format-specific data, where the part and data are described by the package designer. The Main Document part of the word processing OpenXML format is one such format-specific part. For more information about this part, see Part 1: Fundamentals in ECMA-376 OpenXML (http://go.microsoft.com/fwlink/p/?linkid=123375).
The definitive way to find a part of interest is by using a relationship type. Several steps are required; for details, see the Parts Overview and the Finding the Core Properties Part how-to task.
For more information about packages, see the Open Packaging Conventions Fundamentals and the OPC.
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 | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
See also
- Core Packaging Interfaces
- Overviews
- Open Packaging Conventions Fundamentals
- Packages Overview
- Getting Started with the Packaging API
- Parts Overview
- Reference
- IOpcFactory
- IOpcPartSet
- IOpcRelationshipSet
- Packaging API Reference
- Packaging API Samples
- External Resources
- ECMA-376 OpenXML