IShellLibrary::SaveInKnownFolder method
Saves the library to a new file in a specified known folder.
Syntax
HRESULT SaveInKnownFolder( [in] REFKNOWNFOLDERID kfidToSaveIn, [in] LPCWSTR pszLibraryName, [in] LIBRARYSAVEFLAGS lsf, [out] IShellItem **ppsiSavedTo );
Parameters
- kfidToSaveIn [in]
-
Type: REFKNOWNFOLDERID
The ID of the known folder in which to save the IShellLibrary object. For more information, see KNOWNFOLDERID.
- pszLibraryName [in]
-
Type: LPCWSTR
The file name under which to save the library. The file name must not include the file name extension; the file name extension is added automatically.
- lsf [in]
-
Type: LIBRARYSAVEFLAGS
The LIBRARYSAVEFLAGS value that specifies how to handle a library name collision.
- ppsiSavedTo [out]
-
Type: IShellItem**
The IShellItem object that represents the library description file into which the library was saved.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
IShellLibrary::Save and SHSaveLibraryInFolderPath create a new library file, and save the file to disk. To save changes made to a library that has an existing library file, call IShellLibrary::Commit.
If the library is saved in the Libraries known folder (FOLDERID_Libraries), the library's location is automatically added to the system index.
Requirements
|
Minimum supported client |
Windows 7 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 R2 [desktop apps only] |
|
Header |
|
|
IDL |
|
See also
- IShellLibrary
- Windows Libraries
- SHSaveLibraryInFolderPath
- Library Description Schema
- Known Folders Sample