IVsUIHierarchy.GetProperty(UInt32, Int32, Object) 方法

定义

获取给定节点或层次结构的属性。

public:
 int GetProperty(System::UInt32 itemid, int propid, [Runtime::InteropServices::Out] System::Object ^ % pvar);
int GetProperty(unsigned int itemid, int propid, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & pvar);
public int GetProperty (uint itemid, int propid, out object pvar);
abstract member GetProperty : uint32 * int * obj -> int
Public Function GetProperty (itemid As UInteger, propid As Integer, ByRef pvar As Object) As Integer

参数

itemid
UInt32

中层次结构中某一项的项标识符。 有关值的列表 itemid ,请参阅 VSITEMID

propid
Int32

中层次结构属性的标识符。 有关值的列表 propid ,请参阅 __VSHPROPID

pvar
Object

弄指向包含属性值的变量的指针。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

实现

注解

COM 签名

从 vsshell:

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

若要获取项目 (层次结构) 的属性,请将值指定为 itemid VSITEMID_ROOT

适用于