I need to read an image from disk to a block of memory using my own program, and let ABBYY OCR SDK to load the image from this block of memory. How to create a __int64 memory handle in C++ so that I can use this handle as a parameter to AddImageFileFromMemory? Thank you for your help!

asked 19 Aug '14, 12:02

BruceYin's gravatar image


You can create a memory handle this way:

IntPtr handle = Marshal.AllocHGlobal((int)len);
//len is the length of the source image

The following sample code could be helpful: Help > Search > AddImageFileFromMemory > Samples.


answered 19 Aug '14, 16:14

SDK_support's gravatar image

SDK_support ♦♦

I searched for "Marshal.AllocHGlobal" and found that this is .NET Framework method. How to create a memory handle in Linux environment, as we are developing our application in a Linux platform?Also, we are currently evaluating the OCR SDK and we have "ABBYY FineReader Engine 11 Sample" installed, I cannot find any code sample for "AddImageFileFromMemory" in help files.

(20 Aug '14, 06:29) BruceYin

Please, send a letter with your question to SDK_Support@abbyy.com and we'll provide you with a modified Hello sample on C++ with demonstrating AddImageFileFromMemory method.


answered 20 Aug '14, 11:16

SDK_support's gravatar image

SDK_support ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 19 Aug '14, 12:02

Seen: 792 times

Last updated: 20 Aug '14, 11:16

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal