IXpsOMVisualBrush::SetVisualLocal method (xpsobjectmodel.h)

Sets the interface pointer of the local, unshared visual used as the source for the brush.

Syntax

HRESULT SetVisualLocal(
  [in] IXpsOMVisual *visual
);

Parameters

[in] visual

A pointer to the IXpsOMVisual interface to be set as the visual for the brush. If a local visual has been set, passing a NULL pointer will release it.

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
visual does not point to a recognized interface implementation. Custom implementation of XPS Document API interfaces is not supported.

Remarks

After you call SetVisualLocal, the visual lookup key is released and GetVisualLookup returns a NULL pointer in the lookup parameter. The table that follows explains the relationship between the local and lookup values of this property.

Most recent method called Object that is returned in visual by GetVisual Object that is returned in visual by GetVisualLocal String that is returned in lookup by GetVisualLookup
SetVisualLocal (this method). The visual that is set by SetVisualLocal. The visual that is set by SetVisualLocal. NULL pointer.

SetVisualLookup

The visual that is retrieved, with a lookup key that matches the key that is set by SetVisualLookup, from the resource directory. NULL pointer. The lookup key that is set by SetVisualLookup.
Neither SetVisualLocal nor SetVisualLookup has been called yet. NULL pointer. NULL pointer. NULL pointer.

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

IXpsOMVisual

IXpsOMVisualBrush

XML Paper Specification

XPS Document Errors