IOpcRelationship::GetTargetMode method (msopc.h)
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
[out, retval] targetMode
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 code | Description |
---|---|
|
The method succeeded. |
|
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
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
External Resources
Finding the Core Properties Part
Getting Started with the Packaging API
Open Packaging Conventions Fundamentals
Overviews
Reference