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.
HRESULT raw_GetPassword( VARIANT_BOOL OwnerNeeded, VARIANT_BOOL* IsResultValid, BSTR* Password );
string GetPassword( bool OwnerNeeded, ref bool IsResultValid );
Visual Basic .NET
Function IImagePasswordCallback_GetPassword( _ OwnerNeeded As Boolean, _ ByRef IsResultValid As Boolean _ ) As String
- [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.
- [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.
- [out, retval] This parameter allows you to return the string to be used as a password for the image file.
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
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.
3/24/2023 8:51:52 AM