IInkRecognizerContext::Recognize method (msinkaut.h)

Performs recognition on an InkStrokes collection and returns recognition results.

Syntax

HRESULT Recognize(
  [in, out]     InkRecognitionStatus  *RecognitionStatus,
  [out, retval] IInkRecognitionResult **RecognitionResult
);

Parameters

[in, out] RecognitionStatus

The most recent InkRecognitionStatus value.

[out, retval] RecognitionResult

When this method returns, contains a pointer to the IInkRecognitionResult results of a recognized collection of strokes, or else NULL if the recognizer could not compute a result for the ink.

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_UNEXPECTED
Unexpected parameter or property type.
E_INK_EXCEPTION
An exception occurred inside the method.
E_OUTOFMEMORY
Cannot allocate memory operation.

Remarks

This method performs recognition synchronously. To start background or asynchronous recognition, call the BackgroundRecognize or BackgroundRecognizeWithAlternates methods.

You must use a try/catch block when calling Recognize because an exception is thrown when the InkDisp object contains no strokes or only deleted strokes.

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

BackgroundRecognize Method

BackgroundRecognizeWithAlternates Method

IInkRecognitionResult Interface

IInkRecognizerContext

InkDisp Class

InkRecognizerContext Class

InkStrokes Collection