SHLoadFilterFromStream

Declaration

HRESULT
SHLoadFilterFromStream (
    IStream *stm,
    REFIID riid,
    PVOID *ppv);

Parameters

The stm argument provides the address of a stream object from which to load a filter.

The riid argument provides the IID of a desired interface to the filter object.

The ppv argument provides the address of a variable that is to receive a pointer to the desired interface.

Return Value

The function returns zero for success, else an error code.

Behaviour

The function creates an empty filter object, loads this filter object’s parameters from the given stream, and queries the filter object for the given interface. Failure to create the filter object is failure for the function. Failure of the filter object’s Load method is failure for the function. Failure of the filter object’s QueryInterface method is failure for the function.

The interfaces that are presently supported by the filter object are IFilterCondition and IAggregateFilterCondition (and the base classes IPersistStream, IPersist and IUnknown).

Availability

The SHLoadFilterFromStream function is exported from SHELL32.DLL as ordinal 819 in the version 6.00 from Windows Vista, and higher.

This function was not documented by Microsoft for the January 2007 edition of the Windows Vista Software Development Kit (SDK).