IVsHierarchy.GetProperty Method (UInt32, Int32, Object)


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)

int GetProperty(
	uint itemid,
	int propid,
	out object pvar


Type: System.UInt32

[in] Item identifier of an item in the hierarchy. For a list of itemid values, see VSConstants.VSITEMID.

Type: System.Int32

[in] Identifier of the hierarchy property. For a list of propid values, see __VSHPROPID.

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.

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

From vsshell.idl:

HRESULT IVsHierarchy::GetProperty(
   [in] VSITEMID itemid,
   [in] VSHPROPID propid,
   [out] VARIANT *pvar
Return to top