IOpcDigitalSignature::GetPackageObjectReference method (msopc.h)

Gets an IOpcSignatureReference interface pointer that represents the reference to the package-specific Object element that has been signed.

Syntax

HRESULT GetPackageObjectReference(
  [out, retval] IOpcSignatureReference **packageObjectReference
);

Parameters

[out, retval] packageObjectReference

An IOpcSignatureReference interface pointer that represents the reference to the package-specific Object element that has been signed.

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

Remarks

The IOpcSignatureReference interface pointer received in the packageObjectReference parameter represents the Reference element that has the URI attribute value set to "#idPackageObject". The URI attribute value of this element is the Id attribute value of the package-specific Object element, prefixed with a pound sign ("#").

When the signature is generated and serialized as signature markup, the reference and the referenced package-specific Object element are signed. The following markup shows the package-specific Reference element and the package-specific Object element in the resultant signature markup.

<!-- Signature markup. -->
<Signature>
    <SignedInfo>
        [...]
        <!-- A reference to the package-specific <Object> that
        is, or will be, signed. -->
        <Reference URI="#idPackageObject">
             [...]
        </Reference>
    </SignedInfo>
    [...]
    <!-- The package-specific <Object> element. -->
    <Object Id="idPackageObject">
        <!-- This element contains the <Reference> elements that
        refer to parts and relationships in the package that are
        or will be signed. -->
        <Manifest>
            [...] 
        </Manifest>
    </Object>
</Signature>

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

IOpcDigitalSignature

Overviews

Packaging API Programming Guide

Packaging API Reference

Packaging API Samples

Packaging Digital Signature Interfaces

Packaging Interfaces

Reference