IStrokeBuilder::AppendPackets method (rtscom.h)

Adds a packet to the end of the digitizer input packet list.

Syntax

HRESULT AppendPackets(
  [in] TABLET_CONTEXT_ID tcid,
  [in] STYLUS_ID         sid,
  [in] ULONG             cPktBuffLength,
  [in] const LONG        *pPackets
);

Parameters

[in] tcid

The context identifier for the tablet device to which the stylus belongs.

[in] sid

The identifier of the stylus object.

[in] cPktBuffLength

The number of LONGs in the pPackets array not the size in bytes. Valid values are between 0 and 0x7FFF, inclusive.

[in] pPackets

The start of the packet data. It is read-only.

Return value

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

Remarks

This method should be called when data packets are sent as a result of the stylus moving while it is touching or in range of the digitizer.

Note  The incoming packet data is in Himetric format and must be converted to pixels.
 

Examples

The following C++ example shows the implementation of a IStylusPlugin::Packets Method method on an IStylusPlugin Interface object. The plug-in uses a StrokeBuilder object to create a new ink stroke. The IStrokeBuilder::AppendPackets Method method is called from IStylusPlugin::Packets Method to add new packet data to a stroke in progress as the user drags the stylus across the digitizer.

STDMETHODIMP CStrokeBuilderPlugin::Packets( 
            /* [in] */ IRealTimeStylus *piRtsSrc,
            /* [in] */ const StylusInfo *pStylusInfo,
            /* [in] */ ULONG cPktCount,
            /* [in] */ ULONG cPktBuffLength,
            /* [size_is][in] */ LONG *pPackets,
            /* [out][in] */ ULONG *pcInOutPkts,
            /* [out][in] */ LONG **ppInOutPkts)
{
	// Add packet to the stroke
	return m_pStrokeBuilder->AppendPackets(pStylusInfo->tcid, pStylusInfo->cid, cPktBuffLength, pPackets);
}

Requirements

Requirement Value
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

CreateStroke Method

IStrokeBuilder

IStrokeBuilder::BeginStroke Method

IStrokeBuilder::EndStroke Method

RealTimeStylus Class

StrokeBuilder Class