INameSpaceTreeControl::GetItemState method

Gets state information about a Shell item.

Syntax

HRESULT GetItemState(
  IShellItem    *psi,
  NSTCITEMSTATE nstcisMask,
  NSTCITEMSTATE *pnstcisFlags
);

Parameters

psi

Type: IShellItem*

A pointer to the Shell item from which to retrieve the state.

nstcisMask

Type: NSTCITEMSTATE

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

pnstcisFlags

Type: NSTCITEMSTATE*

When this method returns, points to a bitmap that contains the values requested 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 requested. As a simple example, if nstcisMask=NSTCIS_SELECTED, then only the first bit in the value pointed to by pnstcisFlags is valid when this method returns. If the first bit in the value pointed to by pnstcisFlags is 1, then the NSTCIS_SELECTED flag is set. If the first bit in the value pointed to by pnstcisFlags is 0, then the NSTCIS_SELECTED flag is not set.

Requirements

   
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)