IOpcRelationshipSet::GetRelationshipsContentStream method (msopc.h)

Gets a read-only stream that contains the part content of the Relationships part represented by the set.

Syntax

HRESULT GetRelationshipsContentStream(
  [out, retval] IStream **contents
);

Parameters

[out, retval] contents

A pointer to the IStream interface of the read-only stream that contains the part content of the Relationships part represented by the set.

If the relationships stored in the Relationships part have not been modified, part content can include markup compatibility data that is not otherwise accessible through the relationship objects in the set.

Return value

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

Return code Description
S_OK
The method succeeded.
E_POINTER
The contents parameter is NULL.
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

Calling this method will parse and validate all the relationships in the relationships markup. If the Relationships part contains invalid relationships markup, the markup cannot be retrieved by this method.

For more information about markup compatibility and packages, see Part 5: Markup Compatibility in ECMA-376 OpenXML (https://www.ecma-international.org/publications-and-standards/standards/ecma-376/).

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 only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header msopc.h

See also

ECMA-376 OpenXML

External Resources

Getting Started with the Packaging API

IOpcRelationshipSet

Overviews

Packaging API Reference

Packaging API Samples

Packaging Errors

Reference

Relationships Overview