Chinese Simplified (简体中文)

OpenImageFileFromMemory Method of the Engine Object

This method opens an image file from the global memory, where it was previously loaded by the user.

Syntax

HRESULT OpenImageFileFromMemory(
  void*                   DataPtr,
  __int64                 DataSize,
  IImagePasswordCallback* Callback,
  IPrepareImageMode*      PrepareMode,
  BSTR                    FileName
  IImageDocument**        Result
);
    
    

Parameters

HGlobal
[in] Specifies the HGLOBAL handle of the memory block which contains the image file. The handle is passed as __int64. This handle should be valid.
Callback
[in] This variable refers to the interface of the user-implemented object of the type ImagePasswordCallback which is used to handle possible password requests for accessing images in PDF format. This parameter is optional and may be 0, in which case password-protected files cannot be processed.
PrepareMode
[in] Refers to the PrepareImageMode object which specifies how an image will be preprocessed during opening. This parameter is optional and may be 0, in which case either the default parameters are used, or, if a profile has been loaded, the parameters set by this profile are used.
FileName
[in] Specifies the name of the image file. This information is used to define the format of the file, and in error messages. This parameter is optional and may be 0.
Result
[out, retval] A pointer to IImageDocument* pointer variable that receives the interface pointer of the resulting ImageDocument object.

Return values

This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.

Remarks

  • Notice that for multi-page image files, the ImageDocument object will be created only from the first page. To open all pages of the file, use the AddImageFileFromMemory method of the FRDocument object.

See also

Engine

IFRDocument::AddImageFileFromMemory

03.07.2024 8:50:10

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.