IOpcRelationshipSelector::GetSelectionCriterion method (msopc.h)

Gets a string that is used to select relationships to be referenced for signing.

Syntax

HRESULT GetSelectionCriterion(
  [out, retval] LPWSTR *selectionCriterion
);

Parameters

[out, retval] selectionCriterion

A string used to select relationships to be referenced for signing.

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

Remarks

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

Use the IOpcRelationshipSelector interface methods to select relationships for signing. A relationship is selected if its type or identifier matches the string that is retrieved by calling the GetSelectionCriterion method. This string is either a relationship type or a relationship identifier. Call the GetSelectorType method to get an OPC_RELATIONSHIP_SELECTOR value to determine whether the string is a relationship type or an identifier. To access these relationship properties, call the IOpcRelationship::GetRelationshipType and IOpcRelationship::GetId methods.

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

Core Packaging Interfaces

Digital Signatures Overview

Getting Started with the Packaging API

IOpcRelationship

IOpcRelationshipSelector

IOpcRelationshipSelectorEnumerator

IOpcRelationshipSelectorSet

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Interfaces

Reference