IRealTimeStylus::GetTablet method (rtscom.h)

Retrieves an IInkTablet Interface object to the caller.


HRESULT GetTablet(
  [out, retval] IInkTablet **ppiSingleTablet


[out, retval] ppiSingleTablet

A pointer to the IInkTablet Interface object.

Return value

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


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.


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.


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


RealTimeStylus Class