Share via


Méthode IShellLibrary ::SetOptions (shobjidl_core.h)

Définit les options de bibliothèque.

Syntaxe

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

Paramètres

[in] lofMask

Type : LIBRARYOPTIONFLAGS

Masque de bits qui spécifie les valeurs LIBRARYOPTIONFLAGS à modifier dans cet appel.

[in] lofOptions

Type : LIBRARYOPTIONFLAGS

Masque de bits qui spécifie la nouvelle valeur de chaque valeur LIBRARYOPTIONFLAGS à modifier. LIBRARYOPTIONFLAGS Les valeurs qui ne sont pas définies dans lofMask ne sont pas modifiées par cet appel.

Valeur retournée

Type : HRESULT

Si cette méthode réussit, elle retourne S_OK. Sinon, elle retourne un code d’erreur HRESULT.

Remarques

LIBRARYOPTIONFLAGS est un énumérateur au niveau du bit, ce qui signifie que plusieurs indicateurs d’option peuvent être définis.

Pour modifier une valeur d’option, vous devez définir la valeur d’option que vous souhaitez modifier dans lofMask , puis définir ou effacer la valeur de l’option dans lofOptions.

Exemples

L’exemple suivant efface l’option de bibliothèque 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);

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows 7 [applications de bureau uniquement]
Serveur minimal pris en charge Windows Server 2008 R2 [applications de bureau uniquement]
Plateforme cible Windows
En-tête shobjidl_core.h (incluez Shobjidl.h)

Voir aussi

IShellLibrary

LIBRARYOPTIONFLAGS

Bibliothèques Windows