Export (0) Print
Expand All

IVsUIShellOpenDocument.OpenSpecificEditor Method

Opens a specified editor.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

int OpenSpecificEditor (
	[InAttribute] uint grfOpenSpecific,
	[InAttribute] string pszMkDocument,
	[InAttribute] ref Guid rguidEditorType,
	[InAttribute] string pszPhysicalView,
	[InAttribute] ref Guid rguidLogicalView,
	[InAttribute] string pszOwnerCaption,
	[InAttribute] IVsUIHierarchy pHier,
	[InAttribute] uint itemid,
	[InAttribute] IntPtr punkDocDataExisting,
	[InAttribute] IServiceProvider pSPHierContext,
	out IVsWindowFrame ppWindowFrame
)
int OpenSpecificEditor (
	/** @attribute InAttribute() */ UInt32 grfOpenSpecific, 
	/** @attribute InAttribute() */ String pszMkDocument, 
	/** @attribute InAttribute() */ /** @ref */ Guid rguidEditorType, 
	/** @attribute InAttribute() */ String pszPhysicalView, 
	/** @attribute InAttribute() */ /** @ref */ Guid rguidLogicalView, 
	/** @attribute InAttribute() */ String pszOwnerCaption, 
	/** @attribute InAttribute() */ IVsUIHierarchy pHier, 
	/** @attribute InAttribute() */ UInt32 itemid, 
	/** @attribute InAttribute() */ IntPtr punkDocDataExisting, 
	/** @attribute InAttribute() */ IServiceProvider pSPHierContext, 
	/** @attribute OutAttribute() */ /** @ref */ IVsWindowFrame ppWindowFrame
)
JScript does not support passing value-type arguments by reference.

Parameters

grfOpenSpecific

[in] Values taken from the __VSOSPEFLAGS enumeration.

pszMkDocument

[in] String form of the unique moniker identifier of the document in the project system. If the document is a file, you can simply specify the file extension for this parameter rather than the full path to the file (for example, .bmp or txt). In non-file cases, this identifier is often in the form of a URL.

rguidEditorType

[in] Unique identifier of the editor type.

pszPhysicalView

[in] Name of the physical view. If a null reference (Nothing in Visual Basic), the environment calls MapLogicalView on the editor factory to determine the physical view that corresponds to the logical view. In this case, a null reference (Nothing in Visual Basic) does not specify the primary view, but rather indicates that you do not know which view corresponds to the logical view.

rguidLogicalView

[in] GUID identifying the logical view. For a list of logical view GUIDS, see Interaction Between Logical Views and Physical Views. If you implement IVsMultiViewDocumentView on your document view object, then the value passed into the rguidLogicalView parameter determines which view is activated when the editor window is shown when the editor is instantiated. By specifying the logical view GUID, the caller of InitializeEditorInstance can request the specific view that matches the reason the caller is requesting the view. For example, the caller would specify LOGVIEWID_Debugging to get the view appropriate for debugging view, or LOGVIEWID_TextView to get the view appropriate for the text editor (that is, a view that implements IVsCodeWindow).

pszOwnerCaption

[in] Initial caption defined by the document owner (that is, the project) for the document window. This is often of the form: "ProjectName – ItemName."

pHier

[in] Pointer to the IVsUIHierarchy interface.

itemid

[in] UI hierarchy item identifier for the specified editor. For more information see VSITEMID.

punkDocDataExisting

[in] Pointer to the IUnknown interface.

pSPHierContext

[in] Pointer to the IServiceProvide interface.

ppWindowFrame

[out, retval] Pointer to the IVsWindowFrame interface.

Return Value

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

COM Signature

From vsshell.idl:

HRESULT IVsUIShellOpenDocument::OpenSpecificEditor(
   [in] VSOSPEFLAGS grfOpenSpecific,
   [in] LPCOLESTR pszMkDocument,
   [in] REFGUID rguidEditorType,
   [in] LPCOLESTR pszPhysicalView,
   [in] REFGUID rguidLogicalView,
   [in] LPCOLESTR pszOwnerCaption,
   [in] IVsUIHierarchy *pHier,
   [in] VSITEMID itemid,
   [in] IUnknown *punkDocDataExisting,
   [in] IServiceProvider *pSPHierContext,
   [out, retval] IVsWindowFrame **ppWindowFrame
);

Community Additions

ADD
Show:
© 2015 Microsoft