IShellLibrary::GetFolders method

Gets the set of child folders that are contained in the library.

Syntax


HRESULT GetFolders(
  [in]  LIBRARYFOLDERFILTER lff,
  [in]  REFIID              riid,
  [out] void                **ppv
);

Parameters

lff [in]

Type: LIBRARYFOLDERFILTER

One of the following LIBRARYFOLDERFILTER values that determines the folders to get. These flags cannot be combined.

LFF_FORCEFILESYSTEM (1)

Get only file-system folders. File-system folders are folders that have the SFGAO_FILESYSTEM attribute set.

LFF_STORAGEITEMS (2)

Get all folders that can be bound to IStorage objects. These folders are folders that have the SFGAO_STORAGE or SFGAO_FILESYSTEM attribute set.

LFF_ALLITEMS (3)

Get all folders in the library.

riid [in]

Type: REFIID

A reference to the IID of the interface to get in ppv. This value is typically IID_IShellItemArray, but it can also be IID_IObjectCollection, IID_IObjectArray, or the IID of any other interface that is implemented by CShellItemArray.

ppv [out]

Type: void**

A pointer to the interface requested in riid. If this call fails, this value is NULL.

Return value

Type: HRESULT

This method can return one of these values.

Return codeDescription
S_OK

The call was successful and the specified folders were returned in ppv.

S_FALSE

The call was successful but not all specified folders were returned in ppv.

E_

This method can return other error values.

 

Remarks

This method gets an ordered list of folders. By default, this method only returns storage locations.

For best results, use the IID_PPV_ARGS macro, defined in Objbase.h, for the riid and ppv parameters. This macro provides the correct IID based on the interface pointed to by the value in ppv, which eliminates the possibility of a coding error.

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

Windows Libraries
SFGAO
IShellItemArray
IObjectCollection
IObjectArray
IShellLibrary
SHAddFolderPathToLibrary
SHRemoveFolderPathFromLibrary
IShellLibrary::AddFolder
SHLoadLibraryFromItem
SHLoadLibraryFromKnownFolder
SHLoadLibraryFromParsingName
IShellLibrary::LoadLibraryFromItem
IShellLibrary::LoadLibraryFromKnownFolder
LIBRARYFOLDERFILTER
Library Description Schema

 

 

Show: