Поделиться через


IXpsOMDictionary::Append method

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

Syntax

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

Parameters

  • key [in]
    The key to be used for this entry.

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

  • entry [in]
    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

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMDictionary

IXpsOMBrush

IXpsOMShareable

IXpsOMVisual

XPS Document Errors

XML Paper Specification