Share via


IVsUserContextItem.GetAttribute(String, Int32, String[], String[]) Method

Definition

Gets the attributes of the user-selected item in the shell.

int GetAttribute(std::wstring const & pszAttrName, int index, std::Array <std::wstring const &> const & pbstrName, std::Array <std::wstring const &> const & pbstrValue);
public int GetAttribute (string pszAttrName, int index, string[] pbstrName, string[] pbstrValue);
abstract member GetAttribute : string * int * string[] * string[] -> int
Public Function GetAttribute (pszAttrName As String, index As Integer, Optional pbstrName As String(), Optional pbstrValue As String()) As Integer

Parameters

pszAttrName
String

[in] The name of the attribute of the selected item in the shell to search for.

index
Int32

[in] The integer entry point into the array of strings containing attributes.

pbstrName
String[]

[out] The string array of attributes that match the name of the attribute searched for.

pbstrValue
String[]

[out] The string array of values that correspond to the string array of attributes returned by the member when called.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From context.idl:

HRESULT IVsUserContextItem::GetAttribute(  
   [in] LPCOLESTR pszAttrName,   
   [in] int index,   
   [out, optional] BSTR * pbstrName,   
   [out, optional, retval] BSTR * pbstrValue  
);  

Applies to