IInkAnalyzer::IsAnalyzing method
Retrieves a value indicating whether the IInkAnalyzer is performing ink analysis.
Syntax
HRESULT IsAnalyzing(
[out] VARIANT_BOOL *pbAnalyzing
);
Parameters
-
pbAnalyzing [out]
-
VARIANT_TRUE if the IInkAnalyzer is performing ink analysis; otherwise, VARIANT_FALSE.
Return value
For a description of the return values, see Classes and Interfaces - Ink Analysis.
Remarks
This property is VARIANT_TRUE if the IInkAnalyzer is performing synchronous or asynchronous analysis.
Examples
The following example shows a method that walks the ink analyzer's IContextNode results tree. If the ink analyzer is not currently performing ink analysis, the method does the following.
- Gets the top recognition string.
- Gets the ink analyzer's root node.
- Calls a helper method,
ExploreContextNode
, to examine the root node and its child nodes.
// Helper method that explores the current analysis results of an ink analyzer.
HRESULT CMyClass::ExploreAnalysisResults(
IInkAnalyzer *pInkAnalyzer)
{
// Check that the ink analyzer is not currently analyzing ink.
VARIANT_BOOL bIsAnalyzing;
HRESULT hr = pInkAnalyzer->IsAnalyzing(&bIsAnalyzing);
if (SUCCEEDED(hr))
{
if (bIsAnalyzing)
{
return E_PENDING;
}
// Get the ink analyzer's best-result string.
BSTR recognizedString = NULL;
hr = pInkAnalyzer->GetRecognizedString(&recognizedString);
if (SUCCEEDED(hr))
{
// Insert code that records the ink analyzer's best-result string here.
// Get the ink analyzer's root node.
IContextNode *pRootNode = NULL;
hr = pInkAnalyzer->GetRootNode(&pRootNode);
if (SUCCEEDED(hr))
{
// Call a helper method that recursively explores context
// nodes and their subnodes.
hr = this->ExploreContextNode(pRootNode);
}
// Release this reference to the root node.
if (pRootNode != NULL)
{
pRootNode->Release();
pRootNode = NULL;
}
}
// Free the system resources for the recognized string.
SysFreeString(recognizedString);
}
return hr;
}
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows XP Tablet PC Edition [desktop apps only] |
Minimum supported server |
None supported |
Header |
|
DLL |
|