Freigeben über


IVsProvideUserContext.GetUserContext(IVsUserContext) Method

Definition

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

public:
 int GetUserContext([Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUserContext ^ % ppctx);
public:
 int GetUserContext([Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUserContext ^ &  ppctx);
int GetUserContext([Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUserContext const & & ppctx);
public int GetUserContext (out Microsoft.VisualStudio.Shell.Interop.IVsUserContext ppctx);
abstract member GetUserContext : IVsUserContext -> int
Public Function GetUserContext (ByRef ppctx As IVsUserContext) As Integer

Parameters

ppctx
IVsUserContext

[out] Pointer to the IVsUserContext interface, representing the context bag for the selection container.

Returns

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.

Applies to