IDirectManipulationContent::SetTag method (directmanipulation.h)

Specifies the tag object for the content.

Syntax

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

Parameters

[in] object

The object portion of the tag.

[in] id

The ID portion of the tag.

Return value

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

Remarks

GetTag and SetTag are useful for associating an external COM object with the content without an external mapping between the two. They can also be used to pass information to callbacks generated for the content.

A tag is a pairing of an integer ID (id) with a Component Object Model (COM) object (object). It can be used by an app to store and retrieve an arbitrary object associated with the content.

The object parameter is optional, so that the method can set just the identifier portion.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header directmanipulation.h

See also

IDirectManipulationContent