AVIBuildFilterA function (vfw.h)
The AVIBuildFilter function builds a filter specification that is subsequently used by the GetOpenFileName or GetSaveFileName function.
Syntax
HRESULT AVIBuildFilterA(
LPSTR lpszFilter,
LONG cbFilter,
BOOL fSaving
);
Parameters
lpszFilter
Pointer to the buffer containing the filter string.
cbFilter
Size, in characters, of buffer pointed to by lpszFilter.
fSaving
Flag that indicates whether the filter should include read or write formats. Specify TRUE to include write formats or FALSE to include read formats.
Return value
Returns AVIERR_OK if successful or an error otherwise. Possible error values include the following.
Return code | Description |
---|---|
|
The buffer size cbFilter was smaller than the generated filter specification. |
|
There was not enough memory to complete the read operation. |
Remarks
This function accesses the registry for all filter types that the AVIFile library can use to open, read, or write multimedia files. It does not search the hard disk for filter DLLs and formats.
Note
The vfw.h header defines AVIBuildFilter as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | vfw.h |
Library | Vfw32.lib |
DLL | Avifil32.dll |