Udostępnij za pośrednictwem


IVsMonitorUserContext.CreateEmptyContext(IVsUserContext) Method

Definition

Creates a new context or subcontext bag on the context provider.

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

Parameters

ppContext
IVsUserContext

[out] Pointer to the IVsUserContext interface representing the new context or subcontext bag.

Returns

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

Remarks

COM Signature

From context.idl:

HRESULT IVsMonitorUserContext::CreateEmptyContext(  
   [out, retval] IVsUserContext ** ppContext  
);  

Use this method to create a context bag on any context provider or to link up a new subcontext bag to a context bag. You must create a context or subcontext bag before you can add context to the context provider. This method returns a pointer to the IVsUserContext interface, which is used to manage the context or subcontext bag. Once you have created an empty context bag, add attributes or keywords to the context bag by calling AddAttribute. To add attributes and keywords to a subcontext bag, call AddSubcontext.

Applies to