IVsProject3.IsDocumentInProject 方法

定义

确定文档是否在项目中。

public:
 int IsDocumentInProject(System::String ^ pszMkDocument, [Runtime::InteropServices::Out] int % pfFound, cli::array <Microsoft::VisualStudio::Shell::Interop::VSDOCUMENTPRIORITY> ^ pdwPriority, [Runtime::InteropServices::Out] System::UInt32 % pitemid);
int IsDocumentInProject(std::wstring const & pszMkDocument, [Runtime::InteropServices::Out] int & pfFound, std::Array <Microsoft::VisualStudio::Shell::Interop::VSDOCUMENTPRIORITY> const & pdwPriority, [Runtime::InteropServices::Out] unsigned int & pitemid);
public int IsDocumentInProject (string pszMkDocument, out int pfFound, Microsoft.VisualStudio.Shell.Interop.VSDOCUMENTPRIORITY[] pdwPriority, out uint pitemid);
abstract member IsDocumentInProject : string * int * Microsoft.VisualStudio.Shell.Interop.VSDOCUMENTPRIORITY[] * uint32 -> int
Public Function IsDocumentInProject (pszMkDocument As String, ByRef pfFound As Integer, pdwPriority As VSDOCUMENTPRIORITY(), ByRef pitemid As UInteger) As Integer

参数

pszMkDocument
String

中指向要搜索的文档名字对象的指针。

pfFound
Int32

弄指向布尔值的指针。 如果 true 在项目中找到了文档,则实施者将内容设置为 false ; 否则,将发生错误。

pdwPriority
VSDOCUMENTPRIORITY[]

弄如果找到文档,则为其值从枚举中获取的优先级级别 VSDOCUMENTPRIORITY ; 如果不是,则为零; 否则出现错误。

pitemid
UInt32

弄指向项目中文档的项标识符的指针。 应为 VSITEMID_ROOT 或其他有效的项标识符。 请参见枚举 VSITEMID 。 如果找到该文档,则实施者将内容设置为一个值;如果未找到或发生错误,则执行器会将内容设置为零。

返回

Int32

如果该方法成功,则它会返回 S_OK。 如果该方法失败,则会返回错误代码。

实现

注解

COM 签名

从 vsshell:

HRESULT IVsProject3::IsDocumentInProject(  
   [in] LPCOLESTR pszMkDocument,  
   [out] BOOL *pfFound,  
   [out] VSDOCUMENTPRIORITY *pdwPriority,  
   [out] VSITEMID *pitemid  
);  

如果任何参数为 null ,请将任何非 null 参数设置为其错误设置,并返回 E_INVALIDARG

适用于