Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 3.57 KB

nf-shobjidl-shsetdefaultproperties.md

File metadata and controls

89 lines (67 loc) · 3.57 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:shobjidl.SHSetDefaultProperties
SHSetDefaultProperties function (shobjidl.h)
Applies the default set of properties on a Shell item.
SHSetDefaultProperties
SHSetDefaultProperties function [Windows Shell]
_shell_SHSetDefaultProperties
shell.SHSetDefaultProperties
shobjidl/SHSetDefaultProperties
shell\SHSetDefaultProperties.htm
shell
c3ab80a3-c1f3-4223-9fe3-f7fe48c36460
12/05/2018
SHSetDefaultProperties, SHSetDefaultProperties function [Windows Shell], _shell_SHSetDefaultProperties, shell.SHSetDefaultProperties, shobjidl/SHSetDefaultProperties
shobjidl.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
Shell32.lib
Shell32.dll
Windows
19H1
SHSetDefaultProperties
shobjidl/SHSetDefaultProperties
c++
APIRef
kbSyntax
DllExport
Shell32.dll
SHSetDefaultProperties

SHSetDefaultProperties function

-description

Applies the default set of properties on a Shell item.

-parameters

-param hwnd [in, optional]

Type: HWND

A handle to the item's parent window, which receives error notifications. This value can be NULL.

-param psi [in]

Type: IShellItem*

A pointer to the IShellItem object that represents the item.

-param dwFileOpFlags

Type: DWORD

Flags that customize the operation. See IFileOperation::SetOperationFlags for flag values.

-param pfops [in, optional]

Type: IFileOperationProgressSink*

A pointer to an IFileOperationProgressSink object used to follow the progress of the operation. See IFileOperation::Advise for details. This value can be NULL.

-returns

Type: HRESULT

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

-remarks

The list of properties to set a default value comes from the SetDefaultsFor registry entry under the ProgID for the file association of the item. The list is prefixed by "prop:" and contains the canonical names of the properties to set the default value, for example, "prop:System.Author;System.Document.DateCreated". The possible properties for this list are System.Author, System.Document.DateCreated, and System.Photo.DateTaken. If the SetDefaultsFor entry does not exist on the ProgID, this function uses the default found on the SetDefaultsFor entry of HKEY_CLASSES_ROOT\*.