INameSpaceTreeControl::SetItemState method (shobjidl_core.h)

Sets state information for a Shell item.

Syntax

HRESULT SetItemState(
  [in] IShellItem    *psi,
  [in] NSTCITEMSTATE nstcisMask,
  [in] NSTCITEMSTATE nstcisFlags
);

Parameters

[in] psi

Type: IShellItem*

A pointer to the Shell item for which to set the state.

[in] nstcisMask

Type: NSTCITEMSTATE

Specifies which information is being set, in the form of a bitmap. One or more of the NSTCITEMSTATE constants.

[in] nstcisFlags

Type: NSTCITEMSTATE

A bitmap that contains the values to set for the flags specified in nstcisMask.

Return value

Type: HRESULT

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

Remarks

The nstcisMask value specifies which bits in the value pointed to by pnstcisFlags are to be set. Other bits are ignored. As a simple example, if nstcisMask=NSTCIS_SELECTED, then the first bit in the nstcisFlags value determines whether that flag is set (1) or removed (0).

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)