static L_SSIZE_T LFileSettings::GetPreLoadFilters(pszFilters, uSize, pnFixedFilters, pnCachedFilters)
Retrieves the current preloaded filters list.
Pointer to a character string to be updated with the current preloaded filters list.
The size in bytes of the buffer pointed to by pszFilters.
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.
Pointer to a variable to be updated with the number of filters that should be loaded. Pass NULL if it is not required.
| Value | Meaning |
|---|---|
| >=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:
Call the function passing pszFilters as NULL and uSize as 0 to retrieve the size required for the filters list as returned value.
Allocate a buffer of size returned value.
Call the function passing the allocated buffer to the pszFilters and the returned value to uSize to retrieve the filters list.
Win32, x64.
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
