IOpcRelationshipSelectorSet::Create method

Creates an IOpcRelationshipSelector interface pointer to represent how a subset of relationships are selected to be signed, and adds the new pointer to the set.

Syntax


HRESULT Create(
  [in]          OPC_RELATIONSHIP_SELECTOR selector,
  [in]          LPCWSTR                   selectionCriterion,
  [out, retval] IOpcRelationshipSelector  **relationshipSelector
);

Parameters

selector [in]

A value that describes how to interpret the string that is passed in selectionCriterion.

selectionCriterion [in]

A string that is interpreted to yield a criterion.

relationshipSelector [out, retval]

A new IOpcRelationshipSelector interface pointer that represents how relationships are selected from a Relationships part.

This parameter can be NULL if a pointer to the new interface is not needed.

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_INVALIDARG

The value passed in the selector parameter is not a valid OPC_RELATIONSHIP_SELECTOR enumeration value.

E_POINTER

The partUri parameter is NULL.

 

Remarks

Use the methods of the IOpcRelationshipSelector interface pointers in the set to select relationships for signing.

When an IOpcRelationshipSelector interface pointer is created and added to the set, the criterion it provides access to is saved when the package is saved.

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

OpcDigitalSignature.idl

See also

IOpcRelationshipSelectorSet
Overviews
Getting Started with the Packaging API
Packaging API Programming Guide
Reference
OPC_RELATIONSHIP_SELECTOR
Core Packaging Interfaces
Packaging Digital Signature Interfaces
Packaging Interfaces
Packaging API Reference
Packaging API Samples

 

 

Community Additions

ADD
Show: