IVsUIShellOpenDocument.OpenSpecificEditor Method

Definition

Opens a specified editor.

public:
 int OpenSpecificEditor(System::UInt32 grfOpenSpecific, System::String ^ pszMkDocument, Guid % rguidEditorType, System::String ^ pszPhysicalView, Guid % rguidLogicalView, System::String ^ pszOwnerCaption, Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ pHier, System::UInt32 itemid, IntPtr punkDocDataExisting, Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ pSPHierContext, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ % ppWindowFrame);
public int OpenSpecificEditor (uint grfOpenSpecific, string pszMkDocument, ref Guid rguidEditorType, string pszPhysicalView, ref Guid rguidLogicalView, string pszOwnerCaption, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy pHier, uint itemid, IntPtr punkDocDataExisting, Microsoft.VisualStudio.OLE.Interop.IServiceProvider pSPHierContext, out Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame ppWindowFrame);
abstract member OpenSpecificEditor : uint32 * string * Guid * string * Guid * string * Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy * uint32 * nativeint * Microsoft.VisualStudio.OLE.Interop.IServiceProvider * IVsWindowFrame -> int
Public Function OpenSpecificEditor (grfOpenSpecific As UInteger, pszMkDocument As String, ByRef rguidEditorType As Guid, pszPhysicalView As String, ByRef rguidLogicalView As Guid, pszOwnerCaption As String, pHier As IVsUIHierarchy, itemid As UInteger, punkDocDataExisting As IntPtr, pSPHierContext As IServiceProvider, ByRef ppWindowFrame As IVsWindowFrame) As Integer

Parameters

grfOpenSpecific
UInt32

[in] Values taken from the __VSOSPEFLAGS enumeration.

pszMkDocument
String

[in] String form of the unique moniker identifier of the document in the project system, for example, the full path to the file. In non-file cases, this identifier is often in the form of a URL.

rguidEditorType
Guid

[in] Unique identifier of the editor type.

pszPhysicalView
String

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

rguidLogicalView
Guid

[in] GUID identifying the logical view. For a list of logical view GUIDS, see Logical View and Physical View. 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(UInt32, IntPtr, IntPtr, String, Guid, String, Guid, String, String, IVsUIHierarchy, UInt32, IntPtr, IServiceProvider, Guid, IVsWindowFrame) 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
String

[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
IVsUIHierarchy

[in] Pointer to the IVsUIHierarchy interface.

itemid
UInt32

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

punkDocDataExisting
IntPtr

nativeint

[in] Pointer to the IUnknown interface.

pSPHierContext
IServiceProvider

[in] Pointer to the IServiceProvide interface.

ppWindowFrame
IVsWindowFrame

[out, retval] Pointer to the IVsWindowFrame interface.

Returns

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

Remarks

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  
);  

Applies to