主要代码
Var
doc :IDocument;
Img :IImage;
Layout :ILayout;
begin
doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument;
doc.create('c:\despeckle.tif');
doc.ocr(miLANG_ENGLISH,true,true);
Img := IDispatch(doc.Images[0]) as IImage;
Layout := IDispatch(Img.Layout) as ILayout;
Memo1.Lines.Add(Layout.Text);
mid.Document := doc;
doc.Close(false);
Img := nil;
Layout := nil;
end;
每次运行到doc.create('c:\despeckle.tif');都出错---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EOleException with message '没有注册类别'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------