Επεξεργασία

Κοινή χρήση μέσω


INameSpaceTreeControl::GetItemState method (shobjidl_core.h)

Gets state information about a Shell item.

Syntax

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

Parameters

[in] psi

Type: IShellItem*

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

[in] nstcisMask

Type: NSTCITEMSTATE

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

[out] 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

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)