IOpcPart interface
Represents a part that contains data and is not a Relationships part.
When to implement
Never. Custom implementations of this interface are not supported.
Members
The IOpcPart interface inherits from the IUnknown interface. IOpcPart also has these types of members:
Methods
The IOpcPart interface has these methods.
| Method | Description |
|---|---|
| GetCompressionOptions |
Gets a value that describes the way part content is compressed. |
| GetContentStream |
Gets a stream that provides read/write access to part content. |
| GetContentType |
Gets the media type of part content. |
| GetName |
Gets a part URI object that represents the part name. |
| GetRelationshipSet |
Gets a relationship set object that represents the Relationships part that stores relationships that have the part as their source. |
Remarks
To create a part object to represent a part, call the IOpcPartSet::CreatePart method. To get a pointer to the interface of a part object that represents an existing part, call the IOpcPartSet::GetPart or IOpcPartEnumerator::GetCurrent method.
A Relationships part cannot be represented by an implementation of the IOpcPart interface.
Methods of an IOpcPart interface provide access to part information through the properties listed in the following table:
| Method | Property | Description |
|---|---|---|
| GetCompressionOptions | Compression |
The compression option to be used on part content. |
| GetContentStream | Content |
The stream of bytes that makes up the part as described in the ECMA-376 OpenXML, 1st Edition, Part 2: Open Packaging Conventions (OPC). |
| GetContentType | Content type |
The media type of the part content, as specified by the package designer in compliance with the rules in the OPC. |
| GetName | Name |
The URI of the part in the package. |
For more information about parts, 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
- Getting Started with the Packaging API
- Open Packaging Conventions Fundamentals
- Parts Overview
- Reference
- IOpcPartSet
- IStream
- OPC_COMPRESSION_OPTIONS
- Packaging API Reference
- Packaging API Samples
- External Resources
- ECMA-376 OpenXML