MemoryRecognitionResultSize Example for C++ 5.0 and later
void CSample_COMDlg::OnButton21()
{
pRasterDoc->EnableSaveResultsToMemory = TRUE;
pRasterDoc->RecognitionDataFileName = "c:\\testrdf.rdf";
pRasterDoc->SpellLanguageID = LANGID_ENGLISH;
int nRet = pRasterDoc->Recognize (0, 1);
if (nRet == 0)
{
nRet = pRasterDoc->SaveResultsToMemory ();
if (nRet == 0)
{
CString csResult;
csResult.Format (TEXT("Recognition Result Size = %d"), pRasterDoc->MemoryRecognitionResultSize);
AfxMessageBox(csResult);
csResult.Format (TEXT("Recognition Result = %s"), pRasterDoc->MemoryRecognitionResult);
AfxMessageBox(csResult);
}
else
AfxMessageBox(TEXT("Failed to save results to memory."));
}
}