IXpsOMDictionary::GetAt method (xpsobjectmodel.h)

Gets the IXpsOMShareable interface pointer and the key name string of the entry at a specified index in the dictionary.

Syntax

HRESULT GetAt(
  [in]          UINT32          index,
  [out]         LPWSTR          *key,
  [out, retval] IXpsOMShareable **entry
);

Parameters

[in] index

The zero-based index of the dictionary entry that is to be obtained.

[out] key

The key string that is found at the location specified by index.

[out, retval] entry

The IXpsOMShareable interface pointer that is found at the location specified by index.

Return value

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

Remarks

The interface pointers that are 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.

This method allocates the memory used by the string that is returned in key. If key is not NULL, use the CoTaskMemFree function to free the memory.

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