IOpcRelationship::GetTargetMode method

Gets a value that describes whether the relationship's target is internal or external to the package.

Syntax


HRESULT GetTargetMode(
  [out, retval] OPC_URI_TARGET_MODE *targetMode
);

Parameters

targetMode [out, retval]

A value that describes whether the relationship's target is internal or external to the package.

If the target of the relationship is internal, the target is a part.

If the target of the relationship is external, the target is a resource outside of the package.

Return value

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

Return codeDescription
S_OK

The method succeeded.

E_POINTER

The targetMode parameter is NULL.

 

Remarks

If the relationship target is internal, the target is a part. The URI of the target is relative to the URI of the source part.

To get the URI of the target of the relationship, call the IOpcRelationship::GetTargetUri method.

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 the Parts Overview and Finding the Core Properties Part.

For more information about relationships, see the 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

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

IOpcRelationship
Overviews
Finding the Core Properties Part
Getting Started with the Packaging API
Open Packaging Conventions Fundamentals
Relationships Overview
Reference
OPC_URI_TARGET_MODE
Packaging API Reference
Packaging API Samples
External Resources
ECMA-376 OpenXML

 

 

Community Additions

ADD
Show: