Registers an invisible editor on the specified document.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int RegisterInvisibleEditor( string pszMkDocument, IVsProject pProject, uint dwFlags, IVsSimpleDocFactory pFactory, out IVsInvisibleEditor ppEditor )
- Type: String
The name of the document.
- Type: Microsoft.VisualStudio.Shell.Interop.IVsProject
The project to which the file must belong. If null 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).
- Type: 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.
- Type: Microsoft.VisualStudio.Shell.Interop.IVsSimpleDocFactory
An instance of IVsSimpleDocFactory that is used to load the document if it isn't already open. If null is supplied, a default editor factory is used to load the file into a shell-provided instance of IVsTextLines.
- Type: Microsoft.VisualStudio.Shell.Interop.IVsInvisibleEditor
Filled with the newly created and registered invisible editor instance.
Return ValueType: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.