Freigeben über


IVsMonitorUserContext.CreateEmptyContext Method

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

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

Syntax

'Declaration
Function CreateEmptyContext ( _
    <OutAttribute> ByRef ppContext As IVsUserContext _
) As Integer
'Usage
Dim instance As IVsMonitorUserContext
Dim ppContext As IVsUserContext
Dim returnValue As Integer

returnValue = instance.CreateEmptyContext(ppContext)
int CreateEmptyContext(
    out IVsUserContext ppContext
)
int CreateEmptyContext(
    [OutAttribute] IVsUserContext^% ppContext
)
function CreateEmptyContext(
    ppContext : 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 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.

Permissions

See Also

Reference

IVsMonitorUserContext Interface

IVsMonitorUserContext Members

Microsoft.VisualStudio.Shell.Interop Namespace