# EditorFactory.CreateEditorView Method

Visual Studio 2005

Creates a code window with the Visual Studio core editor.

This method is not CLS-compliant.

Namespace: Microsoft.VisualStudio.Package
Assembly: Microsoft.VisualStudio.Package.LanguageService (in microsoft.visualstudio.package.languageservice.dll)

## Syntax

public virtual IntPtr CreateEditorView (
string moniker,
IVsTextLines buffer,
string physicalView,
out string editorCaption,
out Guid cmdUI
)
public IntPtr CreateEditorView (
String moniker,
IVsTextLines buffer,
String physicalView,
/** @attribute OutAttribute() */ /** @ref */ String editorCaption,
/** @attribute OutAttribute() */ /** @ref */ Guid cmdUI
)
JScript does not support passing value-type arguments by reference.

#### Parameters

moniker

String form of the moniker identifier of the document in the project system. In the case of documents that are files, this is always the path to the file.

buffer

The buffer used to set the text buffer for all views in the code window.

physicalView

Name of the physical view.

editorCaption

Initial caption defined by the document editor for the document window. This is typically a string enclosed in square brackets, such as "[Form]". This value is passed as an input parameter to the CreateDocumentWindow method. If the file is [ReadOnly] the caption will be set during load of the file.

cmdUI

GUID_TextEditorFactory

#### Return Value

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