Home COM GDI+ WebBrowser Data Access

IFolderFilter Interface

 

IID_IFolderFilter

{9CC22886-DC8E-11d2-B1D0-00C04F8EEB3E}

 

 

Exposed by a client to specify how to filter the enumeration of a Shell folder by a server application.

 

Remarks

The most common use of this interface is when your application calls SHBrowseForFolder. When you call this function, you become a client of the folder browser object. That object communicates with you by sending messages to a callback function, BrowseCallbackProc. The BFFM_IUNKNOWN message contains a pointer to the folder browser's IUnknown interface. To filter folder enumeration:

  1. Use the IUnknown pointer to call the folder browser's QueryInterface method, and request a pointer to the IFolderFilterSite interface.

  2. Call IFolderFilterSite::SetFilter, and pass the folder browser a pointer to your IFolderFilter interface.

  3. The folder browser will then query the two methods of interface to determine how to filter the enumeration.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IFolderFilter Methods

Description

ShouldShow

Allows a client to specify which individual items should be enumerated.

GetEnumFlags

Allows a client to specify which classes of objects in a Shell folder should be enumerated.

 

ShouldShow

 

FUNCTION IFolderFilter_ShouldShow ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL psf AS DWORD _
, BYVAL pidlFolder AS DWORD _
, BYVAL pidlItem AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IFolderFilter_ShouldShow (pthis, pidlFolder, pidlItem) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

GetEnumFlags

 

FUNCTION IFolderFilter_GetEnumFLags ( _
  BYVAL pthis AS DWORD PTR _
, BYVAL psf AS DWORD _
, BYVAL pidlFolder AS DWORD _
, BYVAL phwnd AS DWORD _
, BYREF pgrfFlags AS DWORD _
  ) AS LONG

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IFolderFilter_GetEnumFlags (pthis, pidlFolder, phwnd, pgrfFlags) TO HRESULT
  FUNCTION = HRESULT

END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:40:20 +0200