Partager via


IVsUIShellOpenDocument.IsDocumentInAProject Method

Determines whether a document is part of the project.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'Declaration
Function IsDocumentInAProject ( _
    pszMkDocument As String, _
    <OutAttribute> ByRef ppUIH As IVsUIHierarchy, _
    <OutAttribute> ByRef pitemid As UInteger, _
    <OutAttribute> ByRef ppSP As IServiceProvider, _
    <OutAttribute> ByRef pDocInProj As Integer _
) As Integer
int IsDocumentInAProject(
    string pszMkDocument,
    out IVsUIHierarchy ppUIH,
    out uint pitemid,
    out IServiceProvider ppSP,
    out int pDocInProj
)
int IsDocumentInAProject(
    [InAttribute] String^ pszMkDocument, 
    [OutAttribute] IVsUIHierarchy^% ppUIH, 
    [OutAttribute] unsigned int% pitemid, 
    [OutAttribute] IServiceProvider^% ppSP, 
    [OutAttribute] int% pDocInProj
)
abstract IsDocumentInAProject : 
        pszMkDocument:string * 
        ppUIH:IVsUIHierarchy byref * 
        pitemid:uint32 byref * 
        ppSP:IServiceProvider byref * 
        pDocInProj:int byref -> int
function IsDocumentInAProject(
    pszMkDocument : String, 
    ppUIH : IVsUIHierarchy, 
    pitemid : uint, 
    ppSP : IServiceProvider, 
    pDocInProj : int
) : 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.

  • pitemid
    Type: UInt32%

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

  • pDocInProj
    Type: Int32%

    [out, retval] Flags that indicate whether a document is part of a project. For more information, see __VSDOCINPROJECT.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsUIShellOpenDocument::IsDocumentInAProject(
   [in] LPCOLESTR pszMkDocument,
   [out] IVsUIHierarchy **ppUIH,
   [out] VSITEMID *pitemid,
   [out] IServiceProvider **ppSP,
   [out, retval] VSDOCINPROJECT *pDocInProj
);

.NET Framework Security

See Also

Reference

IVsUIShellOpenDocument Interface

Microsoft.VisualStudio.Shell.Interop Namespace