L_SetTempFileOptions

#include "l_bitmap.h"

L_LTKRN_API L_INT L_SetTempFileOptions(pTempFileOptions)

Sets the temp file options used by LEADTOOLS. Use this function to control whether temporary files are kept in memory, on disk or a combination of both. If the temp files are kept in disk and memory, you can use this functions to set the thresholds used to determine whether the temp files are kept in memory or on disk.

Parameters

TEMPFILEOPTIONS * pTempFileOptions

Pointer to a structure that contains the temporary file options.

Returns

Value Meaning
SUCCESS The function was successful.
ERROR_NULL_PTR [-814] pTempFileOptions is NULL.
ERROR_INVALID_STRUCT_SIZE [-789] pTempFileOptions is invalid. It should be set to sizeof(TEMPFILEOPTIONS).
< 1 Another error occurred. Refer to Return Codes.

Comments

The uStructSize member of the TEMPFILEOPTIONS structure must be set to sizeof(TEMPFILEOPTIONS) before calling this function.

This feature is available in version 20 or higher.

The values set by this function are global. They will affect all the threads in your process. Existing temporary files are not affected by this function. It is recommended you call this function at the beginning of your application when no other threads are running.

If you set the temporary files to be kept in a combination of disk and memory (the default), then you can provide thresholds for maximum size of an individual memory-backed temp file as well as the total size used for all the temporary files backed by memory.

If a file exceeds the threshold for a single file, it will be dumped to disk. If a file causes the size of all the existing temp files to exceed the threshold for all the temp files in memory, it will be dumped to disk. Once a temporary file is dumped to disk, it will stay on disk (it will not be brought back into memory if its size is reduced).

For more details, see the TEMPFILEOPTIONS topic.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

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

LEADTOOLS Raster Imaging C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.