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

‘선언
Function GetAttribute ( _
    pszAttrName As String, _
    index As Integer, _
    <OutAttribute> pbstrName As String(), _
    <OutAttribute> pbstrValue As String() _
) As Integer
‘사용 방법
Dim instance As IVsUserContextItem
Dim pszAttrName As String
Dim index As Integer
Dim pbstrName As String()
Dim pbstrValue As String()
Dim returnValue As Integer

returnValue = instance.GetAttribute(pszAttrName, _
    index, pbstrName, pbstrValue)
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: System.String
    [in] The name of the attribute of the selected item in the shell to search for.
  • pbstrName
    Type: array<System.String[]
    [out] The string array of attributes that match the name of the attribute searched for.
  • pbstrValue
    Type: array<System.String[]
    [out] The string array of values that correspond to the string array of attributes returned by the member when called.

Return Value

Type: System.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

See Also

Reference

IVsUserContextItem Interface

IVsUserContextItem Members

Microsoft.VisualStudio.Shell.Interop Namespace