IDirectManipulationContent::GetTag method (directmanipulation.h)

Retrieves the tag object set on this content.

Syntax

HRESULT GetTag(
  [in]            REFIID riid,
  [out, optional] void   **object,
  [out, optional] UINT32 *id
);

Parameters

[in] riid

A reference to the identifier of the interface to use. The tag object typically implements this interface.

[out, optional] object

The tag object.

[out, optional] 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.

GetTag queries the tag value for the specified interface and returns a pointer to that interface.

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 identify a motion. The parameters are optional, so that the method can return both parts of the tag, the identifier portion, or the tag object.

Examples

The following example shows the syntax for this method.

IUnknown* pObject;
UINT32 id;

HRESULT hr = pContent->GetTag(IID_PPV_ARGS(&pObject), &id);

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