Home > Software engineering >  Office2003 OCR form in some cases, the collapse of the problem
Office2003 OCR form in some cases, the collapse of the problem

Time:09-19

IIDocument * g_DocumentInfo=new IIDocument;

G_DocumentInfo - & gt; CreateDispatch (" MODI. Document ");
G_DocumentInfo - & gt; Create (" image is loaded. JPG ");
G_DocumentInfo - & gt; OCR (miLANG_CHINESE_SIMPLIFIED, 0, 0);

Basic won't appear in front of the problem, the key is the last line of code above, if the identify the picture is too small (inevitably collapse) or size tipping point (I guess) , or what other reasons can lead to the collapse (TBC)

Described above problem under the VS2010 debug mode with the try,, to can catch the exception handling, but can't catch the exception, in release mode lead to local development version is available, but the release in some cases above lead to collapse, has met the great god help to solve this problem!

My main application is to identify the picture data, basically all is Chinese

CodePudding user response:

Guide did not enter your data to quote what mistakes, them roughly the national cell phone

CodePudding user response:

Do every step strictly judgment
IIDocument * g_DocumentInfo=new IIDocument;
If (g_DocumentInfo)
{
If (g_DocumentInfo - & gt; CreateDispatch (" MODI. Document "))
{
.
}
.
The delete g_DocumentInfo;
}
In addition __try __except capture SEH exception


  • Related