IShellLibrary::SetDefaultSaveFolder method (shobjidl_core.h)

Sets the default target folder that the library will use for save operations.

Syntax

HRESULT SetDefaultSaveFolder(
  [in] DEFAULTSAVEFOLDERTYPE dsft,
  [in] IShellItem            *psi
);

Parameters

[in] dsft

Type: DEFAULTSAVEFOLDERTYPE

The DEFAULTSAVEFOLDERTYPE value that specifies the default save location to set.

[in] psi

Type: IShellItem*

An IShellItem object that represents the folder that to use as the default save location. The folder that this object represents must be a folder that is already in the library.

Return value

Type: HRESULT

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

Remarks

The default save location must be valid, have read/write access, and with either the SFGAO_STREAM or SFGAO_FILESYSTEM attribute set.

If psi is not in the library, this method returns an error.

Requirements

   
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)

See also

IShellLibrary

Library Description Schema

Windows Libraries