Compartir a través de


IVsProvideUserContext.GetUserContext Method

Informs the environment where the selection's context is located.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaración
Function GetUserContext ( _
    <OutAttribute> ByRef ppctx As IVsUserContext _
) As Integer
'Uso
Dim instance As IVsProvideUserContext
Dim ppctx As IVsUserContext
Dim returnValue As Integer

returnValue = instance.GetUserContext(ppctx)
int GetUserContext(
    out IVsUserContext ppctx
)
int GetUserContext(
    [OutAttribute] IVsUserContext^% ppctx
)
abstract GetUserContext : 
        ppctx:IVsUserContext byref -> int 
function GetUserContext(
    ppctx : IVsUserContext
) : int

Parameters

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 vsshell.idl:

HRESULT IVsProvideUserContext::GetUserContext(
   [out, retval] IVsUserContext ** ppctx
);

If this method is called, create a context bag, fill it with the appropriate attributes and keywords, and set the ppctx pointer to inform the environment of where the context is. The context bag is then associated with an ISelectionContainer object. For information about how to create a context bag, see IVsMonitorUserContext. For information about how to manage a context bag, see IVsUserContext.

.NET Framework Security

See Also

Reference

IVsProvideUserContext Interface

IVsProvideUserContext Members

Microsoft.VisualStudio.Shell.Interop Namespace