Gets the part name of the Relationships part that stores relationships that have the source URI represented by the current OPC URI object.
Syntax
HRESULT GetRelationshipsPartUri(
[out, retval] IOpcPartUri **relationshipPartUri
);
Parameters
- relationshipPartUri [out]
-
A pointer to the IOpcPartUri interface of the part URI object that represents the part name of the Relationships part. The source URI of the relationships stored in this Relationships part is represented by the current OPC URI object.
Return Value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code/value | Description |
- S_OK
| The method succeeded.
|
- E_POINTER
|
The relationshipPartUri parameter is NULL.
|
- OPC_E_NONCONFORMING_URI
- 0x80510001
|
The current IOpcUri represents a Relationships part and cannot be the source of any relationships.
|
-
CreateUri function error
|
An HRESULT error code from the CreateUri function.
|
-
WinINet error
|
An HRESULT error code from a WinINet API.
|
Remarks
The following table shows Relationships part URIs for some OPC URIs.
| OPC URI | Relationships Part Name | Return Value |
| /mydoc/images/picture.jpg | /mydoc/images/_rels/picture.jpg.rels | S_OK |
| / | /_rels/.rels | S_OK |
| /mydoc/images/_rels/picture.jpg.rels | Undefined | OPC_E_NONCONFORMING_URI |
Support on Previous Windows Versions
The behavior and performance of this method is the same on all supported Windows versions. For more information, see Getting Started with the Packaging API, and >Platform Update for Windows Vista.
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, Windows Vista with SP2 and Platform Update for Windows Vista |
| Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 |
| Header | Msopc.h |
| IDL | Opcparturi.idl |
See Also
- IOpcUri
- Overviews
- Getting Started with the Packaging API
- >Platform Update for Windows Vista
Reference
- Packaging Errors
- Packaging API Reference
- Packaging API Samples
External Resources
- ECMA-376 OpenXML
Send comments about this topic to Microsoft
Build date: 11/16/2009