IXpsOMDictionary::Append method (xpsobjectmodel.h)

Appends an IXpsOMShareable interface along with its key to the end of the dictionary.

Syntax

HRESULT Append(
  [in] LPCWSTR         key,
  [in] IXpsOMShareable *entry
);

Parameters

[in] key

The key to be used for this entry.

The string referenced by key must be unique in the dictionary.

[in] entry

A pointer to the IXpsOMShareable interface that is to be appended to the dictionary.

A dictionary cannot contain duplicate interface pointers. This parameter must contain an interface pointer that is not already in the dictionary.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK
The method succeeded.
XPS_E_NO_CUSTOM_OBJECTS
entry does not point to a recognized interface implementation. Custom implementation of XPS Document API interfaces is not supported.

Remarks

The interface pointers stored in a dictionary will usually point to interfaces, such as IXpsOMBrush and IXpsOMVisual, that are derived from the IXpsOMShareable interface. To determine the interface type, call the IXpsOMShareable::GetType method.

The figure that follows illustrates how the dictionary is changed by the Append method.

A figure that shows how Append adds an entry to the dictionary

Requirements

Requirement Value
Minimum supported client Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header xpsobjectmodel.h

See also

IXpsOMBrush

IXpsOMDictionary

IXpsOMShareable

IXpsOMVisual

XML Paper Specification

XPS Document Errors