IFileSaveDialog::ApplyProperties method

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

psi [in]

Type: IShellItem*

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

pStore [in]

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.

hwnd [in]

Type: HWND

The handle of the application window.

pSink [in]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft