IVsUIShellOpenDocument4.OpenDocumentViaProject2 Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds an appropriate project to open the document.
public:
Microsoft::VisualStudio::Shell::Interop::IVsWindowFrame ^ OpenDocumentViaProject2(System::String ^ pszMkDocument, Guid % rguidLogicalView, bool fSupportExternalItems, [Runtime::InteropServices::Out] Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ % ppSP, [Runtime::InteropServices::Out] Microsoft::VisualStudio::Shell::Interop::IVsUIHierarchy ^ % ppHier, [Runtime::InteropServices::Out] System::UInt32 % pitemid);
public Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame OpenDocumentViaProject2 (string pszMkDocument, ref Guid rguidLogicalView, bool fSupportExternalItems, out Microsoft.VisualStudio.OLE.Interop.IServiceProvider ppSP, out Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy ppHier, out uint pitemid);
abstract member OpenDocumentViaProject2 : string * Guid * bool * IServiceProvider * IVsUIHierarchy * uint32 -> Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame
Public Function OpenDocumentViaProject2 (pszMkDocument As String, ByRef rguidLogicalView As Guid, fSupportExternalItems As Boolean, ByRef ppSP As IServiceProvider, ByRef ppHier As IVsUIHierarchy, ByRef pitemid As UInteger) As IVsWindowFrame
Parameters
- 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.
- rguidLogicalView
- Guid
in] Unique identifier of the logical view. If the editor implements IVsMultiViewDocumentView on the 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, you can request the specific view that matches the reason you are requesting the view. For example, specify LOGVIEWID_Debugging to get the view appropriate for debugging, or LOGVIEWID_TextView to get the view appropriate for the text editor (that is, a view that implements IVsCodeWindow).
- fSupportExternalItems
- Boolean
True if the project supports external items, otherwise false.
- ppSP
- IServiceProvider
[out] Pointer to the IServiceProvideroledbinterfaces_implemented_by_the_provider interface.
- ppHier
- IVsUIHierarchy
[out] Pointer to the IVsUIHierarchy interface of the project that can open the document.
- pitemid
- UInt32
[out] Pointer to the hierarchy item identifier of the document in the project. For more information see VSITEMID
.
Returns
The HRESULT.
Remarks
This is the same as IVsUIShellOpenDocument.OpenDocumentViaProject() except that it can force non-support of opening documents in a hierarchy that aren't in the hierarchy's physical project but can be associated with the hierarchy via IVsUIHierarchy.ParseCanonicalName() and the item's VSHPROPID_ExternalItem property is true.