IRealTimeStylus::GetTablet method (rtscom.h)

Retrieves an IInkTablet Interface object to the caller.

Syntax

HRESULT GetTablet(
  IInkTablet **ppiSingleTablet
);

Parameters

ppiSingleTablet

A pointer to the IInkTablet Interface object.

Return value

For a description of the return values, see RealTimeStylus Classes and Interfaces.

Remarks

This method returns, ppiSingleTablet will contain NULL when the RealTimeStylus is receiving data from more that one tablet. For instance, when the IRealTimeStylus::SetAllTabletsMode Method is called with a value of TRUE on a machine with a digitizer and mouse.

Examples

The following C++ example code gets a pointer to the IInkTablet Interface object and uses that pointer to get the tablet's Plug and Play identifier.

// Must be in single tablet mode for GetTablet to succeed. This call to
// SetSingleTabletMode() would likely happen somewhere else in the app.
if (SUCCEEDED(g_pRealTimeStylus->SetSingleTabletMode(pInkTablet)))
{
    IInkTablet* pTablet = NULL;

    if ((SUCCEEDED(g_pRealTimeStylus->GetTablet(&pTablet))) && (NULL != pTablet))
    {
        BSTR bstrPnPID;

        if (SUCCEEDED(pTablet->get_PlugAndPlayId(&bstrPnPID)))
        {
            TRACE("The tablet's Plug-n-Play ID is: %s\n", bstrPnPID);
        }
    }

    // Restore all tablets mode.
    g_pRealTimeStylus->SetAllTabletsMode(TRUE);
}

Requirements

   
Minimum supported client Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header rtscom.h
DLL RTSCom.dll

See also

IInkTablet Interface

IRealTimeStylus

RealTimeStylus Class