IInkStrokeDisp::GetPacketValuesByProperty method (msinkaut.h)

Retrieves the data for a known packet property from one or more packets in the stroke.


HRESULT GetPacketValuesByProperty(
  [in]           BSTR    PropertyName,
  [in, optional] long    Index,
  [in, optional] long    Count,
  [out, retval]  VARIANT *PacketValues


[in] PropertyName

The identifier from the PacketProperty constants that was used to select which packet data is retrieved.

For more information about the BSTR data type, see Using the COM Library.

[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 points that make up the stroke data. The default value ISC_AllElements, defined in the InkSelectionConstants enumeration type, specifies all of the points that make up the stroke data.

[out, retval] PacketValues

When this method returns, contains an array of signed 32-bit integers that specifies the value of the requested PacketProperty for each point requested from the stroke.

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
The stroke is invalid.
A parameter contained an invalid pointer.
An unspecified error occurred.
Cannot allocate packet data array.
Invalid index, count, or packet property.
An exception occurred inside the method.
Invalid GUID format.


A specific packet property may not be available on a particular IInkStrokeDisp object. A Tablet PC may have more than one tablet for user input. The InkTablets collection contains a list of all the tablets attached to the Tablet PC. Use the IsPacketPropertySupported method to determine if a particular packet property is supported by a specific IInkTablet object or by all the available tablets. Also, use the DesiredPacketDescription property of the ink collector to control which packet properties are collected on new strokes.


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

DesiredPacketDescription Property

IInkStrokeDisp Interface

IInkTablet Interface

InkTablets Collection

IsPacketPropertySupported Method

ItemSelectionConstants Enumeration

PacketPropertyGuids Constants