IVsUIShellOpenDocument::OpenSpecificEditor Method (UInt32, String^, Guid, String^, Guid, String^, IVsUIHierarchy^, UInt32, IntPtr, IServiceProvider^, IVsWindowFrame^)
Opens a specified editor.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
int OpenSpecificEditor( unsigned int grfOpenSpecific, String^ pszMkDocument, [InAttribute] Guid% rguidEditorType, String^ pszPhysicalView, [InAttribute] Guid% rguidLogicalView, String^ pszOwnerCaption, IVsUIHierarchy^ pHier, unsigned int itemid, IntPtr punkDocDataExisting, IServiceProvider^ pSPHierContext, [OutAttribute] IVsWindowFrame^% ppWindowFrame )
Parameters
- grfOpenSpecific
-
Type:
System::UInt32
[in] Values taken from the __VSOSPEFLAGS enumeration.
- pszMkDocument
-
Type:
System::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
-
Type:
System::Guid
[in] Unique identifier of the editor type.
- pszPhysicalView
-
Type:
System::String^
[in] Name of the physical view. If null, the environment calls MapLogicalView 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
-
Type:
System::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 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
-
Type:
System::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
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsUIHierarchy^
[in] Pointer to the IVsUIHierarchy interface.
- itemid
-
Type:
System::UInt32
[in] UI hierarchy item identifier for the specified editor. For more information see VSITEMID.
- punkDocDataExisting
-
Type:
System::IntPtr
[in] Pointer to the IUnknown interface.
- pSPHierContext
-
Type:
Microsoft.VisualStudio.OLE.Interop::IServiceProvider^
[in] Pointer to the IServiceProvide interface.
- ppWindowFrame
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsWindowFrame^
[out, retval] Pointer to the IVsWindowFrame interface.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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 );