IShellLibrary::SetOptions method

Sets the library options.

Syntax


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

Parameters

lofMask [in]

Type: LIBRARYOPTIONFLAGS

A bitmask that specifies the LIBRARYOPTIONFLAGS values to change in this call.

lofOptions [in]

Type: LIBRARYOPTIONFLAGS

A bitmask that specifies the new value of each LIBRARYOPTIONFLAGS value to change. LIBRARYOPTIONFLAGS values that are not set in lofMask are not changed by this call.

Return value

Type: HRESULT

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

Remarks

LIBRARYOPTIONFLAGS is a bitwise enumerator, which means that more than one option flag can be set.

To change an option value, you must set the option value that you want to change in lofMask and then set or clear the value of the option in lofOptions.

Examples

The following example clears the LOF_PINNEDTONAVPANE library option.



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);

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Shobjidl.h

IDL

Shobjidl.idl

See also

Windows Libraries
IShellLibrary
LIBRARYOPTIONFLAGS

 

 

Show: