Chinese Simplified (简体中文)

GetPassword Method of the IImagePasswordCallback Interface

This method is implemented by the user. ABBYY FineReader Engine can use a pointer to the IImagePasswordCallback interface in methods that open image files to request passwords for protected files, actually PDFs. Typical implementation of this method could show a dialog box where the user can provide a password necessary to access the image file.

Syntax

HRESULT raw_GetPassword(
  VARIANT_BOOL  OwnerNeeded,
  VARIANT_BOOL* IsResultValid,
  BSTR*         Password
);
    

Parameters

OwnerNeeded
[in] This parameters indicates whether user (OwnerNeeded=False) or owner (OwnerNeeded=True) password is requested for the image file in PDF format. Owner password provides highest access level to the document's contents and properties.
IsResultValid
[in, out] This parameter should be set to TRUE if result value in the Password should be used by ABBYY FineReader Engine. When it is set to FALSE, ABBYY FineReader Engine will act as if no password was available and will not open the image file. The default value of this parameter is FALSE.
Password
[out, retval] This parameter allows you to return the string to be used as a password for the image file.

Return values

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

Remarks

This method may be called by ABBYY FineReader Engine possibly more than once, until the correct password is returned or isResultValid parameter is set to FALSE, which means that the user cannot (or does not want to) enter the password.

See also

IImagePasswordCallback

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.