#include "ltwrappr.h"
static L_SSIZE_T LFileSettings::GetPreLoadFilters(pszFilters, uSize, pnFixedFilters, pnCachedFilters)
L_TCHAR * pszFilters; |
pointer to a character string to be updated with filters |
L_SIZE_T uSize; |
size in bytes of pszFilters |
L_INT * pnFixedFilters; |
pointer to a variable to be updated |
L_INT * pnCachedFilters; |
pointer to a variable to be updated |
Retrieves the current preloaded filters list.
Parameter |
Description |
pszFilters |
Pointer to a character string to be updated with the current preloaded filters list. |
uSize |
The size in bytes of the buffer pointed to by pszFilters. |
pnFixedFilters |
Pointer to a variable to be updated with the number of filters that should stay loaded in memory at all times. Pass NULL if it is not required. |
pnCachedFilters |
Pointer to a variable to be updated with the number of filters that should be loaded. Pass NULL if it is not required. |
>=0 |
The size in bytes of the preloaded filters list. |
< 0 |
An error occurred. Refer to Return Codes. |
In case the current preloaded filters list should be changed, call this function before calling the LFileSettings::PreloadFilters function.
The preload filters list contains the list of fixed and cached filters. For more information, refer to LFileSettings::PreloadFilters.
To retrieve the preloaded filters list, the user should:
1. |
Call the function passing pszFilters as NULL and uSize as 0 to retrieve the size required for the filters list as returned value. |
2. |
Allocate a buffer of size returned value. |
3. |
Call the function passing the allocated buffer to the pszFilters and the returned value to uSize to retrieve the filters list. |
Required DLLs and Libraries
LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
LFileSettings::PreLoadFilters, LFileSettings::IgnoreFilters, LFileSettings::GetIgnoreFilters, Class Members |
Topics: |
|
|
L_INT LFileSettings__GetPreLoadFiltersExample()
{
L_TCHAR * pszList = NULL;
L_INT nFixed;
L_INT nCached;
L_SIZE_T nRet;
LBitmap Bitmap;
L_TCHAR buf[80];
/* get the original filters list */
nRet = LFileSettings::GetPreLoadFilters(NULL, 0, NULL, NULL);
pszList = (L_TCHAR *)malloc(nRet*sizeof(L_TCHAR));
nRet = LFileSettings::GetPreLoadFilters(pszList, nRet, &nFixed, &nCached);
::MessageBox(NULL, pszList, TEXT("TEST"), MB_OK);
free(pszList);
wsprintf(buf, TEXT("fixed: %ld, cached: %ld"), nFixed, nCached);
::MessageBox(NULL, buf, TEXT("TEST"), MB_OK);
/* change the preload filters */
/* This example preloads the TGA, PCX and TIF filters */
/* and allows 1 filter to be cached, while always */
/* keeping 2 loaded. */
LFileSettings::PreLoadFilters( 2, 1, TEXT("TGA,PCX,TIF"));
/* get the new filters list */
nRet = LFileSettings::GetPreLoadFilters(NULL, 0, NULL, NULL);
pszList = (L_TCHAR *)malloc(nRet*sizeof(L_TCHAR));
nRet = LFileSettings::GetPreLoadFilters(pszList, nRet, &nFixed, &nCached);
::MessageBox(NULL, pszList, TEXT("TEST"), MB_OK);
free(pszList);
wsprintf(buf, TEXT("fixed: %ld, cached: %ld"), nFixed, nCached);
::MessageBox(NULL, buf, TEXT("TEST"), MB_OK);
/* try to load TGA */
nRet = Bitmap.Load(TEXT("d:\\temp\\test.tga"));
if(nRet == SUCCESS)
::MessageBox(NULL, TEXT("TGA loaded"), TEXT("TEST"), MB_OK);
}
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