FILTERINFO

typedef struct FILTERINFO
{
   L_UINT uStructSize;
   L_TCHAR szName[8];
   L_TCHAR L_FAR * pszExtensionList;
   L_UINT uFlags;
} FILTERINFO, *pFILTERINFO;

The FILTERINFO structure provides filters information.

Member

Description

uStructSize

Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.

szName

NULL terminated character string containing the filter name.

pszExtensionList

Pointer to a character string containing the extension list of files of this type. This speeds up the detection of the file format.

uFlags

Flags that indicate the handling method of the filter. You can combine values when appropriate by using a bitwise OR ( | ). Possible values are:

 

Value

Meaning

 

FILTERINFO_DYNAMIC

[0x0000] Any filter that does not have FILTERINFO_IGNORED or ILTERINFO_FIXED is considered dynamic. LEADTOOLS will dynamically load and unload this filter whenever file formats handled by this filter are loaded, saved or checked. To improve the performance of a file format, you can make it fixed. However, this will consume memory resources.

 

FILTERINFO_IGNORED

[0x0001] Ignore this filter. The user cannot load, save or get information for files handled by this filter. This flag takes precedence over all the other flags except FILTERINFO_PRESENT.

 

FILTERINFO_FIXED

[0x0002] The filter is fixed in memory. This flag takes precedence over FILTERINFO_DYNAMIC.

 

FILTERINFO_LOADMASK

[0x0003] Not a real flag. Use this as a mask to specify the load behavior of a filter.

 

FILTERINFO_PRESENT

[0x0004] The filter is present. If this flag is not used, this mean the filter is missing and all the remaining flags are ignored.

 

FILTERINFO_CHECKEDBYFILEINFO

[0x0008] The filter will be checked even for files whose extensions are not in the extension list that is associated with a filter. This is the default for all the filters that do not have the FILTERINFO_SLOWFILEINFO flag set. If this flag is not used, only files whose extensions match the known extension list are checked.

 

FILTERINFO_SLOWFILEINFO

[0x0010] (Read-only flag) The process of obtaining the file information for a filter will be slow. The user can use this flag to check which filters should use the FILTERINFO_CHECKEDBYFILEINFO flag.

Comments

pFILTERINFO is a pointer to a FILTERINFO structure. Where a function parameter type is pFILTERINFO, declare an FILTERINFO variable and pass the variable's address in the parameter. Declaring a pFILTERINFO variable is necessary only if the program requires a pointer.

The following functions make use of this structure:

L_GetFilterListInfo

L_GetFilterInfo

L_FreeFilterInfo

L_SetFilterInfo