다음을 통해 공유


IVsObjectList.GetUserContext(UInt32, Object) Method

Definition

Returns the user context object for the given list item.

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

Parameters

index
UInt32

[in] Specifies the index of the list item of interest.

ppunkUserCtx
Object

[out] Pointer to a context bag returned as an IUnknown interface.

Returns

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

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsObjectList::GetUserContext(  
   [in] ULONG Index,  
   [out] IUnknown **ppunkUserCtx  
);  

By default, the environment uses the fully qualified item name as the F1 keyword. Use the GetUserContext method to supply supplemental information, such as Language ID, for the given list item when it is selected. The returned context bag must support IVsUserContext to provide additional context attributes and keywords.

Applies to