L_SetTempFileOptions

#include "l_bitmap.h"

L_LTKRN_API L_INT L_SetTempFileOptions(pTempFileOptions)

TEMPFILEOPTIONS * pTempFileOptions;

pointer to a structure

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.

Parameter

Description

pTempFileOptions

Pointer to a structure that contains the temporary file options.

Returns

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

LTKRN
File format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64, Linux.

See Also

Functions:

L_GetTempFileOptions, L_SetTempDirectory, L_GetTempDirectory, L_GetTempFileMode

Topics:

TEMPFILEOPTIONS

Example

For an example, refer to TEMPFILEOPTIONS

For an example, see TEMPFILEOPTIONS.

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

LEADTOOLS Raster Imaging C API Help