IVsUIShellOpenDocument4::OpenDocumentViaProject2 Method (String^, Guid, Boolean, IServiceProvider^, IVsUIHierarchy^, UInt32)
Finds an appropriate project to open the document.
Assembly: Microsoft.VisualStudio.Shell.Interop.12.0 (in Microsoft.VisualStudio.Shell.Interop.12.0.dll)
IVsWindowFrame^ OpenDocumentViaProject2( String^ pszMkDocument, [InAttribute] Guid% rguidLogicalView, bool fSupportExternalItems, [OutAttribute] IServiceProvider^% ppSP, [OutAttribute] IVsUIHierarchy^% ppHier, [OutAttribute] unsigned int% pitemid )
Parameters
- 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.
- rguidLogicalView
-
Type:
System::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
-
Type:
System::Boolean
True if the project supports external items, otherwise false.
- ppSP
-
Type:
Microsoft.VisualStudio.OLE.Interop::IServiceProvider^
[out] Pointer to the IServiceProvideroledbinterfaces_implemented_by_the_provider interface.
- ppHier
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsUIHierarchy^
[out] Pointer to the IVsUIHierarchy interface of the project that can open the document.
- pitemid
-
Type:
System::UInt32
[out] Pointer to the hierarchy item identifier of the document in the project. For more information see VSITEMID.
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.