IVsUIHierarchyWindow.GetItemState Method

Returns the state or appearance of the hierarchy.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function GetItemState ( _
    pHier As IVsUIHierarchy, _
    itemid As UInteger, _
    dwStateMask As UInteger, _
    <OutAttribute> ByRef pdwState As UInteger _
) As Integer
int GetItemState(
    IVsUIHierarchy pHier,
    uint itemid,
    uint dwStateMask,
    out uint pdwState
)
int GetItemState(
    [InAttribute] IVsUIHierarchy^ pHier, 
    [InAttribute] unsigned int itemid, 
    [InAttribute] unsigned int dwStateMask, 
    [OutAttribute] unsigned int% pdwState
)
abstract GetItemState : 
        pHier:IVsUIHierarchy * 
        itemid:uint32 * 
        dwStateMask:uint32 * 
        pdwState:uint32 byref -> int
function GetItemState(
    pHier : IVsUIHierarchy, 
    itemid : uint, 
    dwStateMask : uint, 
    pdwState : uint
) : int

Parameters

  • itemid
    Type: System.UInt32

    [in] Identifier of the item in the hierarchy. For a list of itemid values, see VSITEMID.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIHierarchyWindow::GetItemState(
   [in] IVsUIHierarchy* pHier,
   [in] VSITEMID itemid,
   [in] VSHIERARCHYITEMSTATE dwStateMask,
   [out, retval] VSHIERARCHYITEMSTATE *pdwState
);

Use this method to determine the state of an item in the hierarchy, such as whether the item is expanded, collapsed, bold, or highlighted. Use the ExpandItem method to set the state of an item in the hierarchy.

.NET Framework Security

See Also

Reference

IVsUIHierarchyWindow Interface

Microsoft.VisualStudio.Shell.Interop Namespace