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.
#include "l_bitmap.h"
L_LTKRN_API L_INT L_SetTempFileOptions(pTempFileOptions)
Pointer to a structure that contains the temporary file options.
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. |
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.
Win32, x64, Linux.
For an example, refer to TEMPFILEOPTIONS
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document