IVsUIShellOpenDocument4.OpenDocumentViaProject2 Method
Finds an appropriate project to open the document.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.12.0 (in Microsoft.VisualStudio.Shell.Interop.12.0.dll)
Syntax
'Declaration
Function OpenDocumentViaProject2 ( _
pszMkDocument As String, _
ByRef rguidLogicalView As Guid, _
fSupportExternalItems As Boolean, _
<OutAttribute> ByRef ppSP As IServiceProvider, _
<OutAttribute> ByRef ppHier As IVsUIHierarchy, _
<OutAttribute> ByRef pitemid As UInteger _
) As IVsWindowFrame
IVsWindowFrame OpenDocumentViaProject2(
string pszMkDocument,
ref Guid rguidLogicalView,
bool fSupportExternalItems,
out IServiceProvider ppSP,
out IVsUIHierarchy ppHier,
out uint pitemid
)
IVsWindowFrame^ OpenDocumentViaProject2(
[InAttribute] String^ pszMkDocument,
[InAttribute] Guid% rguidLogicalView,
[InAttribute] bool fSupportExternalItems,
[OutAttribute] IServiceProvider^% ppSP,
[OutAttribute] IVsUIHierarchy^% ppHier,
[OutAttribute] unsigned int% pitemid
)
abstract OpenDocumentViaProject2 :
pszMkDocument:string *
rguidLogicalView:Guid byref *
fSupportExternalItems:bool *
ppSP:IServiceProvider byref *
ppHier:IVsUIHierarchy byref *
pitemid:uint32 byref -> IVsWindowFrame
function OpenDocumentViaProject2(
pszMkDocument : String,
rguidLogicalView : Guid,
fSupportExternalItems : boolean,
ppSP : IServiceProvider,
ppHier : IVsUIHierarchy,
pitemid : uint
) : IVsWindowFrame
Parameters
pszMkDocument
Type: Stringin] 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: 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: BooleanTrue 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: UInt32%[out] Pointer to the hierarchy item identifier of the document in the project. For more information see VSITEMID.
Return Value
Type: Microsoft.VisualStudio.Shell.Interop.IVsWindowFrame
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.