Condividi tramite


IVsHierarchy.GetProperty Method

Gets properties of a given node or of the hierarchy.

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

Syntax

'Dichiarazione
Function GetProperty ( _
    itemid As UInteger, _
    propid As Integer, _
    <OutAttribute> ByRef pvar As Object _
) As Integer
'Utilizzo
Dim instance As IVsHierarchy
Dim itemid As UInteger
Dim propid As Integer
Dim pvar As Object
Dim returnValue As Integer

returnValue = instance.GetProperty(itemid, _
    propid, pvar)
int GetProperty(
    uint itemid,
    int propid,
    out Object pvar
)
int GetProperty(
    [InAttribute] unsigned int itemid, 
    [InAttribute] int propid, 
    [OutAttribute] Object^% pvar
)
abstract GetProperty : 
        itemid:uint32 * 
        propid:int * 
        pvar:Object byref -> int 
function GetProperty(
    itemid : uint, 
    propid : int, 
    pvar : Object
) : int

Parameters

  • propid
    Type: System.Int32
    [in] Identifier of the hierarchy property. For a list of propid values, see __VSHPROPID.
  • pvar
    Type: System.Object%
    [out] Pointer to a VARIANT containing the property value.

Return Value

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

Remarks

To get properties of the project (hierarchy), specify an itemid value of VSITEMID_ROOT.

COM Signature

From vsshell.idl:

HRESULT IVsHierarchy::GetProperty(
   [in] VSITEMID itemid,
   [in] VSHPROPID propid,
   [out] VARIANT *pvar
);

.NET Framework Security

See Also

Reference

IVsHierarchy Interface

IVsHierarchy Members

Microsoft.VisualStudio.Shell.Interop Namespace