IOpcRelationship::GetRelationshipType method (msopc.h)

Gets the relationship type.

Syntax

HRESULT GetRelationshipType(
  [out, retval] LPWSTR *relationshipType
);

Parameters

[out, retval] relationshipType

Receives the relationship type, which is the qualified name of the relationship, as defined by the package format designer or the OPC.

For more information about relationship types see Remarks.

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 relationshipType parameter is NULL.

Remarks

This method allocates memory used by the string returned in relationshipType. If the method succeeds, call the CoTaskMemFree function to free the memory.

The definitive way to find a part of interest is by using a relationship type.

Finding a part of interest requires several steps. For detailed information about finding a part, see Finding the Core Properties Part.

For more information about relationships, relationship types and a list of relationship types defined by the OPC, 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

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

Finding the Core Properties Part

Getting Started with the Packaging API

IOpcRelationship

IOpcRelationshipSet::GetEnumeratorForType

Open Packaging Conventions Fundamentals

Overviews

Packaging API Reference

Packaging API Samples

Reference

Relationships Overview