IInkAnalyzer::Analyze method

Performs synchronous ink analysis.

Syntax

HRESULT Analyze(
  [out] IAnalysisStatus **ppStatus
);

Parameters

ppStatus [out]

A pointer to an IAnalysisStatus that describes the status of the analysis operation.

Return value

For a description of the return values, see Classes and Interfaces - Ink Analysis.

Remarks

Caution

To avoid a memory leak, call IUnknown::Release on ppStatus when you no longer need to use the analysis status.

This method starts a synchronous ink analysis operation. Ink analysis includes layout analysis, writing and drawing classification, and handwriting recognition. This method returns after the analysis operation is complete.

This method returns E_POINTER if ppStatus is NULL.

During a call to IInkAnalyzer::Analyze Method or IInkAnalyzer::BackgroundAnalyze Method, the IInkAnalyzer analyzes ink within its dirty region (see IInkAnalyzer::GetDirtyRegion Method). However, the IInkAnalyzer may expand the analysis operation to include neighboring regions.

This method sets the IInkAnalyzer object's dirty region to an empty region. If another thread has added stroke data that has not been analyzed, the IInkAnalyzer adds the bounding box of the unanalyzed strokes to its dirty region during the reconcile phase of the analysis.

This method returns an error if your application does not handle the _IAnalysisEvents::UpdateStrokesCache event.

The IInkAnalyzer does not raise the _IAnalysisEvents::Results and _IAnalysisEvents::IntermediateResults events in response to this method.

To modify the way ink analysis is performed, use IInkAnalyzer::SetAnalysisModes Method.

For more information about ink analysis, see Ink Analysis Overview.

Examples

The following example performs foreground ink analysis.

// Perform synchronous ink analysis.
IAnalysisStatus *pAnalysisStatus = NULL;
hr = this->m_spIInkAnalyzer->Analyze(&pAnalysisStatus);

if (SUCCEEDED(hr))
{
    // Insert code that processes the analysis results.
}

// Release this reference to the analysis status.
if (pAnalysisStatus != NULL)
{
    pAnalysisStatus->Release();
    pAnalysisStatus = NULL;
}

Requirements

Requirement Value
Minimum supported client
Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server
None supported
Header
IACom.h (also requires IACom_i.c)
DLL
IACom.dll

See also

IInkAnalyzer

AnalysisModes

IInkAnalyzer::GetDirtyRegion Method

IInkAnalyzer::SetDirtyRegion Method

IInkAnalyzer::GetRootNode Method

IInkAnalyzer::BackgroundAnalyze Method