Shell Interfaces


IShellLibrary Interface

Exposes methods for creating and managing libraries.

IShellLibrary Members

AddFolder Adds a folder to the library.
Commit Commits library updates to an existing Library Description file.
GetDefaultSaveFolder Retrieves the default target folder that the library uses for save operations.
GetFolders Gets the set of child folders that are contained in the library.
GetFolderType Gets the library's folder type.
GetIcon Gets the default icon for the library.
GetOptions Gets the library's options.
LoadLibraryFromItem Loads the library from a specified library definition file.
LoadLibraryFromKnownFolder Loads the library that is referenced by a KNOWNFOLDERID.
RemoveFolder Removes a folder from the library.
ResolveFolder Resolves the target location of a library folder, even if the folder has been moved or renamed.
Save Saves the library to a new Library Description (*.library-ms) file.
SaveInKnownFolder Saves the library to a new file in a specified known folder.
SetDefaultSaveFolder Sets the default target folder that the library will use for save operations.
SetFolderType Sets the library's folder type.
SetIcon Sets the default icon for the library.
SetOptions Sets the library options.

Remarks

When to Implement

Custom implementations of IShellLibrary are not supported; client applications use the implementation provided by Shell32.dll.

When to Use

Use IShellLibrary to create a new library, query or update the attributes of an existing library.

Library Helper Functions

The following library helper functions are provided by Shobjidl.h.

NameSummary
SHAddFolderPathToLibraryAdds a folder to a library.
SHCreateLibraryCreates an IShellLibrary object.
SHLoadLibraryFromItemCreates and loads an IShellLibrary object from a specified library definition file.
SHLoadLibraryFromKnownFolderCreates and loads an IShellLibrary object for a specified KNOWNFOLDERID.
SHLoadLibraryFromParsingNameCreates and loads an IShellLibrary object for a specified path.
SHRemoveFolderPathFromLibraryRemoves a folder from a library.
SHResolveFolderPathInLibraryAttempts to resolve the target location of a library folder that has been moved or renamed.
SHResolveLibraryAttempts to find the location of a library.
SHSaveLibraryInFolderPathSaves an IShellLibrary object to disk.
SHShowManageLibraryUIShows the library management dialog, which enables users to manage the library folders and default save location.

Library Enumerations

The following enumerations support libraries.

NameSummary
DEFAULTSAVEFOLDERTYPESpecifies whether the default save location is public or private.
LIBRARYOPTIONFLAGSSpecifies the library options.
LIBRARYSAVEFLAGSDefines options for handling a name collision when saving a library.

Interface Information

Inherits fromIUnknown
Header and IDL filesshobjidl.h, shobjidl.idl
Minimum operating systems Windows 7

See Also

Tags : windows7


Page view tracker