IXpsOMDictionary::GetByKey method

Gets the IXpsOMShareable interface pointer of the entry that contains the specified key.

Syntax

HRESULT GetByKey(
  [in]          LPCWSTR         key,
  [in]          IXpsOMShareable *beforeEntry,
  [out, retval] IXpsOMShareable **entry
);

Parameters

  • key [in]
    The entry's key to be found in the dictionary.

  • beforeEntry [in]
    The IXpsOMShareable interface pointer to the last entry in the dictionary which is to be searched for key. If beforeEntry is NULL or is an interface pointer to an entry that is not in the dictionary, the entire dictionary will be searched.

  • entry [out, retval]
    The interface pointer to the dictionary entry whose key matches key.

Return value

If the method succeeds, it returns S_OK; otherwise, it returns an HRESULT error code.

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.

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

IXpsOMShareable

IXpsOMDictionary

XML Paper Specification