IFolderFilterSite::SetFilter method (shobjidl_core.h)

Exposed by a host to allow clients to pass the host their IUnknown interface pointers.


HRESULT SetFilter(
  [in] IUnknown *punk


[in] punk

Type: IUnknown*

A pointer to the client's IUnknown interface. To notify the host to terminate filtering and stop calling your IFolderFilter interface, set this parameter to NULL.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


After you get a pointer to the host's IFolderFilterSite interface, call this method to pass the host a pointer to your IUnknown interface. The host will then use this pointer to call your QueryInterface method to request a pointer to your IFolderFilter interface. If this call fails, IFolderFilterSite::SetFilter returns E_NOINTERFACEAVAILABLE. If the call is successful, the host will then call the IFolderFilter interface's two methods to determine how to enumerate the contents of the folder.


Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll