PreLoadFilters method (ILEADRasterIO)

Visual Basic example

Visual C++ 5.0 example

Delphi 4 example

C++ Builder example

 

Syntax

short PreLoadFilters (short iFixedFilters, short iCachedFilters, BSTR pszFilters);

Overview

Refer to Loading Filters

Remarks

Specifies the file format filters to be loaded. Some operating systems (like Windows 95) have a limit for the number of DLLs that can be loaded at a time and that limit can be quickly reached, especially if there are several different controls on the same page/form or if the programming environments themselves load many DLLs. You can use this method to restrict the number of DLLs that LEADTOOLS COM objects will load. Note that the fewer file import/export DLLs the COM objects load, the slower the loading/saving of files will be, since there will be more loading/unloading of DLLs.

pszFilters is in the form xyz, yuv... where XYZ are the 3 letters describing the file filter as in LFxyz14S.DLL. For instance, if pszFilter is PCX, TIF, CMP then LFPCX14S.DLL will be loaded then LFTIF14S.DLL and then LFCMP14S.DLL, in that order. The first iFixedFilters will stay in memory at all times, then the next iCachedFilters will be loaded. However, if other filters will be needed, the cached filters might be unloaded to make room for the new DLLs. It is recommended that the most commonly used DLLs be loaded as fixed to minimize the time required to load/unload file filters. Also, some DLLs may require additional DLLs (like the LFAVI14S.DLL or LFFPX14S.DLL) so the exact number of DLLs loaded is not necessarily iFixedFilters+iCachedFilters. For more information on available DLLs, refer to Files To Be Included With Your Application.

Note that PreLoadFilters has effect only if called before the first time you try to load, save or get information about a file. Calling this method after that will have no effect.

See Also

Elements

IgnoreFilters method

Topics

Working with the Control: General Behavior