IVsUserContextItem.GetAttribute Method
Gets the attributes of the user-selected item in the shell.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function GetAttribute ( _
pszAttrName As String, _
index As Integer, _
<OutAttribute> pbstrName As String(), _
<OutAttribute> pbstrValue As String() _
) As Integer
int GetAttribute(
string pszAttrName,
int index,
string[] pbstrName,
string[] pbstrValue
)
int GetAttribute(
[InAttribute] String^ pszAttrName,
[InAttribute] int index,
[OutAttribute] array<String^>^ pbstrName,
[OutAttribute] array<String^>^ pbstrValue
)
abstract GetAttribute :
pszAttrName:string *
index:int *
pbstrName:string[] byref *
pbstrValue:string[] byref -> int
function GetAttribute(
pszAttrName : String,
index : int,
pbstrName : String[],
pbstrValue : String[]
) : int
Parameters
pszAttrName
Type: String[in] The name of the attribute of the selected item in the shell to search for.
index
Type: Int32[in] The integer entry point into the array of strings containing attributes.
pbstrName
Type: array<String[][out] The string array of attributes that match the name of the attribute searched for.
pbstrValue
Type: array<String[][out] The string array of values that correspond to the string array of attributes returned by the member when called.
Return Value
Type: Int32
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
);
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.