Skip to main content

Windows Dev Center

IDirectManipulationViewport::SetTag method

Sets a viewport tag.

Syntax


HRESULT SetTag(
  [in, optional, unique] IUnknown *object,
  [in]                   UINT32   id
);

Parameters

object [in, optional]

The object portion of the tag.

id [in]

The ID portion of the tag.

Return value

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

Remarks

A tag is a pairing of an integer ID with a Component Object Model (COM) object. It can be used by an app to identify the viewport.

The object parameter is optional, so that the method can set just an ID.

Examples

The following example shows the syntax for this method.


IUnknown* pUnk = ...;
UINT32 id = ...;

HRESULT hr = pRegion->SetTag(pUnk, id);

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

DirectManipulation.h

IDL

DirectManipulation.idl

IID

IID_IDirectManipulationViewport is defined as 28b85a3d-60a0-48bd-9ba1-5ce8d9ea3a6d

See also

IDirectManipulationViewport