Export (0) Print
Expand All

IOpcRelationshipSet::GetRelationship method

Gets a relationship object from the set that represents a specified relationship.

Syntax


HRESULT GetRelationship(
  [in]           LPCWSTR relationshipIdentifier,
  [out, retval]  IOpcRelationship **relationship
);

Parameters

relationshipIdentifier [in]

The unique identifier of a relationship.

relationship [out, retval]

A pointer to the IOpcRelationship interface of the relationship object that represents the relationship that has the specified identifier.

Return value

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

Return code/valueDescription
S_OK

The method succeeded.

E_POINTER

The relationship parameter is NULL.

OPC_E_NO_SUCH_RELATIONSHIP
0x80510048

The specified relationship does not exist.

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

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

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 only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Msopc.h

IDL

Opcobjectmodel.idl

See also

IOpcRelationshipSet
Overviews
Getting Started with the Packaging API
Relationships Overview
Reference
Packaging Errors
Packaging API Reference
Packaging API Samples

 

 

Community Additions

ADD
Show:
© 2015 Microsoft