Compartir a través de


IVsInvisibleEditorManager.RegisterInvisibleEditor Method

Registers an invisible editor on the specified document.

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

Syntax

'Declaración
Function RegisterInvisibleEditor ( _
    pszMkDocument As String, _
    pProject As IVsProject, _
    dwFlags As UInteger, _
    pFactory As IVsSimpleDocFactory, _
    <OutAttribute> ByRef ppEditor As IVsInvisibleEditor _
) As Integer
'Uso
Dim instance As IVsInvisibleEditorManager
Dim pszMkDocument As String
Dim pProject As IVsProject
Dim dwFlags As UInteger
Dim pFactory As IVsSimpleDocFactory
Dim ppEditor As IVsInvisibleEditor
Dim returnValue As Integer

returnValue = instance.RegisterInvisibleEditor(pszMkDocument, _
    pProject, dwFlags, pFactory, ppEditor)
int RegisterInvisibleEditor(
    string pszMkDocument,
    IVsProject pProject,
    uint dwFlags,
    IVsSimpleDocFactory pFactory,
    out IVsInvisibleEditor ppEditor
)
int RegisterInvisibleEditor(
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] IVsProject^ pProject, 
    [InAttribute] unsigned int dwFlags, 
    [InAttribute] IVsSimpleDocFactory^ pFactory, 
    [OutAttribute] IVsInvisibleEditor^% ppEditor
)
abstract RegisterInvisibleEditor : 
        pszMkDocument:string * 
        pProject:IVsProject * 
        dwFlags:uint32 * 
        pFactory:IVsSimpleDocFactory * 
        ppEditor:IVsInvisibleEditor byref -> int 
function RegisterInvisibleEditor(
    pszMkDocument : String, 
    pProject : IVsProject, 
    dwFlags : uint, 
    pFactory : IVsSimpleDocFactory, 
    ppEditor : IVsInvisibleEditor
) : int

Parameters

  • pProject
    Type: Microsoft.VisualStudio.Shell.Interop.IVsProject
    The project to which the file must belong. If nulla null reference (Nothing in Visual Basic) is supplied, the file can belong to any project; when opened, it is opened by whichever project responds to IsDocumentInAProject from the shell (including the miscellaneous files project).
  • dwFlags
    Type: System.UInt32
    Zero or more _EDITORREGFLAGS values; If REIF_ENABLECACHING flag is set, the document is loaded and placed in the RDT immediately, if not already present, and attempts are made to keep the document there as long as possible; certain actions may force it to be unlocked, such as user closing without saving, etc. This allows the document to stay in the RDT in the scenario where a document is open in a visible editor, and closed by the user while an invisible editor is registered for that document. Otherwise, the document is not loaded until GetDocData is called (unless. of course, it is already in memory), and no unnecessary attempts to keep the document in the RDT while this editor is registered are made.

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 IVsInvisibleEditorManager::RegisterInvisibleEditor(
   [in] LPCOLESTR pszMkDocument, 
   [in] IVsProject *pProject, 
   [in] EDITORREGFLAGS dwFlags, 
   [in] IVsSimpleDocFactory *pFactory, 
   [out] IVsInvisibleEditor **ppEditor
);

.NET Framework Security

See Also

Reference

IVsInvisibleEditorManager Interface

IVsInvisibleEditorManager Members

Microsoft.VisualStudio.Shell.Interop Namespace