IVsUIShellOpenDocument.IsDocumentInAProject 方法

确定文档是否是项目的一部分。

命名空间:  Microsoft.VisualStudio.Shell.Interop
程序集:  Microsoft.VisualStudio.Shell.Interop(在 Microsoft.VisualStudio.Shell.Interop.dll 中)

语法

声明
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
)

参数

  • pszMkDocument
    类型:System.String
    [in] 字符串文档的唯一标记标识符形式对项目系统,例如,完整路径到文件。在 URL 的形式,在非文件种情况下,此标识符常常是。
  • pitemid
    类型:System.UInt32%
    [out] 为文档的层次结构项 ID 的指针在项目系统的。有关更多信息,请参见VSITEMID。
  • pDocInProj
    类型:System.Int32%
    [out, retval] 指定的标志文档是否是项目的一部分。有关更多信息,请参见 __VSDOCINPROJECT

返回值

类型:System.Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 vsshell.idl:

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

.NET Framework 安全性

请参见

参考

IVsUIShellOpenDocument 接口

Microsoft.VisualStudio.Shell.Interop 命名空间