IFileSaveDialog::ApplyProperties method (shobjidl_core.h)

Applies a set of properties to an item using the Shell's copy engine.

Syntax

HRESULT ApplyProperties(
  [in] IShellItem                 *psi,
  [in] IPropertyStore             *pStore,
  [in] HWND                       hwnd,
  [in] IFileOperationProgressSink *pSink
);

Parameters

[in] psi

Type: IShellItem*

Pointer to the IShellItem that represents the file being saved. This is usually the item retrieved by GetResult.

[in] pStore

Type: IPropertyStore*

Pointer to the IPropertyStore that represents the property values to be applied to the file. This can be the property store returned by IFileSaveDialog::GetProperties.

[in] hwnd

Type: HWND

The handle of the application window.

[in] pSink

Type: IFileOperationProgressSink*

Pointer to an optional IFileOperationProgressSink that the calling application can use if they want to be notified of the progress of the property stamping. This value may be NULL.

Return value

Type: HRESULT

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

Remarks

This method should be used when the application has turned on property collection (IFileSaveDialog::SetCollectedProperties), but does not persist the properties themselves into the saved file.

Note  The file represented by the item specified in psi must exist in physical storage before making the call to IFileSaveDialog::ApplyProperties, so it must have been previously saved at some point.
 

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h