IShellLibrary::SetOptions 方法 (shobjidl_core.h)

設定連結庫選項。

語法

HRESULT SetOptions(
  [in] LIBRARYOPTIONFLAGS lofMask,
  [in] LIBRARYOPTIONFLAGS lofOptions
);

參數

[in] lofMask

類型: LIBRARYOPTIONFLAGS

位掩碼,指定要在此呼叫中變更的 LIBRARYOPTIONFLAGS 值。

[in] lofOptions

類型: LIBRARYOPTIONFLAGS

位掩碼,指定要變更之每個 LIBRARYOPTIONFLAGS 值的新值。 此呼叫不會變更未在 lofMask 中設定的 LIBRARYOPTIONFLAGS 值。

傳回值

類型: HRESULT

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

備註

LIBRARYOPTIONFLAGS 是位列舉值,這表示可以設定多個選項旗標。

若要變更選項值,您必須設定要在 lofMask 中變更的選項值,然後在 lofOptions中設定或清除選項的值。

範例

下列範例會清除 LOF_PINNEDTONAVPANE 連結庫選項。


LIBRARYOPTIONFLAGS	maskValue;
LIBRARYOPTIONFLAGS optionValue;
HRESULT	hr = E_FAIL;

// set the maskValue variable to indicate
// which option value to change
maskValue = LOF_PINNEDTONAVPANE;

// set the optionValue variable to indicate
// the new value of the option
optionValue = ~LOF_PINNEDTONAVPANE;

// call the method
hr = library->SetOptions (maskValue, optionValue);

規格需求

需求
最低支援的用戶端 Windows 7 [僅限傳統型應用程式]
最低支援的伺服器 Windows Server 2008 R2 [僅限傳統型應用程式]
目標平台 Windows
標頭 shobjidl_core.h (包括 Shobjidl.h)

另請參閱

IShellLibrary

LIBRARYOPTIONFLAGS

Windows 媒體櫃