共用方式為


SHCreateDefaultPropertiesOp 函式 (shobjidl.h)

建立檔案作業,以設定尚未設定的殼層專案上的預設屬性。

語法

SHSTDAPI SHCreateDefaultPropertiesOp(
  [in]  IShellItem     *psi,
  [out] IFileOperation **ppFileOp
);

參數

[in] psi

類型: IShellItem*

來源殼層專案的指標。 請參閱 IShellItem

[out] ppFileOp

類型: IFileOperation**

IFileOperation 介面指標的位址。

返回值

類型:HRESULT

如果此函式成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

備註

設定預設值的屬性清單來自專案檔案關聯 ProgID 下的 SetDefaultsFor 登錄專案。 清單以 為 prop: 前綴,並包含用於設定預設值的內容的標準名稱,例如 prop:System.Author;System.Document.DateCreated。 此清單的可能屬性包括 System.AuthorSystem.Document.DateCreatedSystem.Photo.DateTaken。 如果 ProgID 上不存在 SetDefaultsFor 專案,則此函式會使用 HKEY_CLASSES_ROOT\*SetDefaultsFor 專案上找到的預設值。

需求

Requirement 價值觀
最低支援的用戶端 Windows Vista [僅限傳統型應用程式]
支援的最低伺服器 Windows Server 2008 [僅限傳統型應用程式]
目標平臺 窗戶
Header 肖布吉德爾.h
Library 殼層32.lib
DLL Shell32.dll