IOpcRelationshipSet::GetEnumeratorForType method (msopc.h)

Gets an enumerator of the IOpcRelationship interface pointers in the set that point to representations of relationships that have a specified relationship type.

Syntax

HRESULT GetEnumeratorForType(
  [in]          LPCWSTR                    relationshipType,
  [out, retval] IOpcRelationshipEnumerator **relationshipEnumerator
);

Parameters

[in] relationshipType

The relationship type used to identify IOpcRelationship interface pointers to be enumerated.

[out, retval] relationshipEnumerator

A pointer to the IOpcRelationshipEnumerator interface of the enumerator of the IOpcRelationship interface pointers in the set that point to representations of relationships that have a specified relationship type.

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
At least one of the relationshipType and relationshipEnumerator parameters 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

For information about forming the part name for the target of a relationship, see the IOpcRelationship topic.

The IOpcRelationship interface provides access to relationship properties. For details about these properties, see the Relationships Overview and IOpcRelationship.

For more information about relationships, see Open Packaging Conventions Fundamentals and the ECMA-376 OpenXML, 1st Edition, Part 2: Open Packaging Conventions (OPC).

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

Open Packaging Conventions Fundamentals

Overviews

Packaging API Reference

Packaging API Samples

Packaging Errors

Reference

Relationships Overview