Compartir a través de


IVsUIShellOpenDocument4.IsDocumentInAProject2 Method

Determines whether the specified document is in a project.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assemblies:   Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
  Microsoft.VisualStudio.Shell.Interop.12.0 (in Microsoft.VisualStudio.Shell.Interop.12.0.dll)

Syntax

'Declaration
Function IsDocumentInAProject2 ( _
    pszMkDocument As String, _
    fSupportExternalItems As Boolean, _
    <OutAttribute> ByRef ppUIH As IVsUIHierarchy, _
    <OutAttribute> ByRef pitemid As UInteger, _
    <OutAttribute> ByRef ppSP As IServiceProvider _
) As Integer
int IsDocumentInAProject2(
    string pszMkDocument,
    bool fSupportExternalItems,
    out IVsUIHierarchy ppUIH,
    out uint pitemid,
    out IServiceProvider ppSP
)
int IsDocumentInAProject2(
    [InAttribute] String^ pszMkDocument, 
    [InAttribute] bool fSupportExternalItems, 
    [OutAttribute] IVsUIHierarchy^% ppUIH, 
    [OutAttribute] unsigned int% pitemid, 
    [OutAttribute] IServiceProvider^% ppSP
)
abstract IsDocumentInAProject2 : 
        pszMkDocument:string * 
        fSupportExternalItems:bool * 
        ppUIH:IVsUIHierarchy byref * 
        pitemid:uint32 byref * 
        ppSP:IServiceProvider byref -> int
function IsDocumentInAProject2(
    pszMkDocument : String, 
    fSupportExternalItems : boolean, 
    ppUIH : IVsUIHierarchy, 
    pitemid : uint, 
    ppSP : IServiceProvider
) : int

Parameters

  • pszMkDocument
    Type: 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.

  • fSupportExternalItems
    Type: Boolean

    true if the project supports external items, otherwise false.

  • pitemid
    Type: UInt32%

    [out] Pointer to the hierarchy item identifier of the document in the project system. For more information see VSITEMID.

Return Value

Type: Int32
Specifies whether the document is in a project.

Remarks

This is the same as IVsUIShellOpenDocument.IsDocumentInAProject() except that it can support finding 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

See Also

Reference

IVsUIShellOpenDocument4 Interface

Microsoft.VisualStudio.Shell.Interop Namespace