IInkRecognizerContext::Recognize method (msinkaut.h)

Performs recognition on an InkStrokes collection and returns recognition results.

Syntax

HRESULT Recognize(
  InkRecognitionStatus  *RecognitionStatus,
  IInkRecognitionResult **RecognitionResult
);

Parameters

RecognitionStatus

The most recent InkRecognitionStatus value.

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

   
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