Gets the file options used by LEADTOOLS when loading encrypted files.


#include "l_bitmap.h"

L_LTFIL_API L_INT EXT_FUNCTION L_GetDecryptOptions(pOptions, uStructSize)



Pointer to a structure to be updated with the options used when loading encrypted files.

L_UINT uStructSize

Size of the structure pointed to by pOptions. Use sizeof(FILEDECRYPTOPTIONS) to calculate this value.


Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes .


The options obtained by this function are valid for the current thread.

These settings are used for loading all encrypted files (DOC, DOCX, PDF, PPT, PPTX, XLS, XLSX, XLSB, etc). L_GetPDFOptions can also be used to check an additional password used only for PDF files.

To change the current options, change the values in the FILEDECRYPTOPTIONS structure and call L_SetDecryptOptions. Again, this will change the values only for the current thread.

FILEDECRYPTOPTIONS.pszPassword points to the internal buffer used by LEADTOOLS for decrypting files. You should not attempt to free this pointer and assume this pointer is valid. It is only valid until the next call to L_SetDecryptOptions. If you need to use this pointer for extended amount of time, you should make a copy of it.

For example, if you wish to get a copy of this structure and use it to initialize any worker threads, then try the following:

Required DLLs and Libraries


Win32, x64.

See Also




For an example, refer to FILEDECRYPTCALLBACK.

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.