IInkDisp::CreateStroke method (msinkaut.h)

Creates an IInkStrokeDisp object from an array of packet data input values.

Syntax

HRESULT CreateStroke(
  [in]          VARIANT        PacketData,
  [in]          VARIANT        PacketDescription,
  [out, retval] IInkStrokeDisp **Stroke
);

Parameters

[in] PacketData

Specifies the array of packet data. The data is an array of Int32 values which, taken in order, form the array of points (x0, y0), (x1, y1), which is passed into the method within a Variant.

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

[in] PacketDescription

Is a reserved parameter that is currently not implemented.

[out, retval] Stroke

When this method returns, contains a pointer to the newly-created stroke.

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_INVALIDARG
Invalid VARIANT type (only VT_ARRAY | VT_I4 supported).
E_INK_EXCEPTION
An exception occurred inside the method.
E_OUTOFMEMORY
Cannot allocate memory to create the new stroke.

Remarks

The minimum and maximum values of any point in the points array are LONG_MIN and LONG_MAX, respectively. However, these points define an ink space rectangle whose maximum width or height cannot exceed LONG_MAX. Because of this, the difference between the minimum and maximum x-coordinates, or the minimum and maximum y-coordinates, cannot exceed LONG_MAX.

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

CreateStrokes Method

IInkDisp

InkDisp Class