INameSpaceTreeControl::GetItemState method

Gets state information about a Shell item.

Syntax


HRESULT GetItemState(
  [in]   IShellItem *psi,
  [in]   NSTCITEMSTATE nstcisMask,
  [out]  NSTCITEMSTATE *pnstcisFlags
);

Parameters

psi [in]

Type: IShellItem*

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

nstcisMask [in]

Type: NSTCITEMSTATE

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

pnstcisFlags [out]

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]

Header

Shobjidl.h

IDL

Shobjidl.idl

 

 

Community Additions

ADD
Show:
© 2015 Microsoft