IInkStrokeDisp::GetPacketData method (msinkaut.h)

Retrieves the packet data for a range of packets within the IInkStrokeDisp object.

Syntax

HRESULT GetPacketData(
  [in, optional] long    Index,
  [in, optional] long    Count,
  [out, retval]  VARIANT *PacketData
);

Parameters

[in, optional] Index

Optional. The starting point of the zero-based index to a packet within the stroke. The default value ISC_FirstElement, defined in the InkSelectionConstants enumeration type, specifies the first packet.

[in, optional] Count

Optional. The number of point packet data sets that should be returned, starting with the packet specified in the startingIndex parameter. The default value ISC_AllElements, defined in the InkSelectionConstants enumeration type, specifies all of the points that make up the stroke data.

[out, retval] PacketData

When this method returns, contains a signed 32-bit integer array containing the packet data for the requested points in the stroke. The array contains the data for the first point, then the data for the second point, and so on.

For more information about the VARIANT structure, see Using the COM Library.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_POINTER
A parameter contained an invalid pointer.
E_FAIL
An unspecified error occurred.
E_OUTOFMEMORY
Cannot allocate Stroke handler helper object.
E_INVALIDARG
The stroke is invalid.
E_INK_EXCEPTION
An exception occurred inside the method.
E_UNEXPECTED
Unexpected parameter or property type.

Remarks

If the number of packets in the stroke is less than the sum of the startingIndex and pointCount parameters, then the returned array of data contains packet information for fewer points than the count requested.

To retrieve the description of the packet data, use the stroke's PacketDescription property. This property returns an array of globally unique identifier (GUID) that indicates which property values are returned by the GetPacketData method for each point. The PacketProperty constants contain the available packet property GUIDs.

Requirements

Requirement Value
Minimum supported client Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header msinkaut.h
Library InkObj.dll

See also

GetPacketDescriptionPropertyMetrics Method

GetPacketValuesByProperty Method

IInkStrokeDisp Interface

ItemSelectionConstants Enumeration

PacketCount Property

PacketDescription Property

PacketSize Property

SetPacketValuesByProperty Method