HighTechTalks DotNet Forums  

Microsoft Office Document Imaging, Interop.MODI reporting corrupt

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Microsoft Office Document Imaging, Interop.MODI reporting corrupt in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?U3RldmUgV29vZA==?=
 
Posts: n/a

Default Microsoft Office Document Imaging, Interop.MODI reporting corrupt - 06-30-2007 , 08:38 PM






I'm using the Microsoft Office Document Imaging 11.0 Type Library and
performing OCR on images. What I'm doing is starting with a 1600x900 32-bit
image then using the system.drawing.bitmap class to extract smaller images
and then performing OCR on them. When I select a 480x28 pixel image it works
fine, but if I select a 400x24 pixel image I get the following message when I
go to get the text from the layout object:

Error: -2147467261: Attempted to read or write protected memory. This is
often a
n indication that other memory is corrupt.

Here's my code:
Dim tmpStr As String
Dim miDoc As MODI.Document
Dim miImage As MODI.Image
Dim miImageLayout As MODI.ILayout
miDoc = New MODI.Document
miDoc.Create(fileName)
miImage = miDoc.Images.Item(0)
miImage.OCR()
miImageLayout = miImage.Layout
tmpStr = miImageLayout.Text

Is there some restriction on the dimensions of the source image?

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.