IOpcSignaturePartReferenceSet::Create method (msopc.h)
Creates an IOpcSignaturePartReference interface pointer that represents a reference to a part to be signed, and adds the new interface to the set.
Syntax
HRESULT Create(
[in] IOpcPartUri *partUri,
[in] LPCWSTR digestMethod,
[in] OPC_CANONICALIZATION_METHOD transformMethod,
[out, retval] IOpcSignaturePartReference **partReference
);
Parameters
[in] partUri
An IOpcPartUri that represents the part name of the part to be referenced.
[in] digestMethod
The digest method to be used for part content of the part to be referenced. To use the default digest method, pass NULL to this parameter.
[in] transformMethod
The canonicalization method used for part content of the part to be referenced.
[out, retval] partReference
A new IOpcSignaturePartReference interface pointer that represents the reference to the part to be signed.
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 code | Description |
---|---|
|
The method succeeded. |
|
The value passed in the transformMethod parameter is not a valid OPC_CANONICALIZATION_METHOD enumeration value. |
|
The partUri parameter is NULL. |
Remarks
Only parts that can be represented by the IOpcPart interface can be referenced by an IOpcSignaturePartReference interface pointer. Relationships parts are referenced for signing by a pointer to the IOpcSignatureRelationshipReference interface. To create an IOpcSignatureRelationshipReference interface pointer, call the IOpcSignatureRelationshipReferenceSet::Create method.
When an IOpcSignaturePartReference interface pointer is created and added to the set, the reference it represents 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
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
Getting Started with the Packaging API
IOpcSignatureRelationshipReferenceSet
Overviews
Packaging API Programming Guide
Packaging Digital Signature Interfaces
Reference