IVsSolutionBuildManager2.QueryProjectDependency 方法

定义

检查一个项目是否依赖于另一个项目。

public:
 int QueryProjectDependency(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHierDependentOn, [Runtime::InteropServices::Out] int % pfIsDependentOn);
int QueryProjectDependency(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHier, Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHierDependentOn, [Runtime::InteropServices::Out] int & pfIsDependentOn);
public int QueryProjectDependency (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHier, Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHierDependentOn, out int pfIsDependentOn);
abstract member QueryProjectDependency : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * int -> int
Public Function QueryProjectDependency (pHier As IVsHierarchy, pHierDependentOn As IVsHierarchy, ByRef pfIsDependentOn As Integer) As Integer

参数

pHier
IVsHierarchy

中一个指针,指向要 IVsHierarchy 检查其依赖项的项目的对象 pHierDependentOn

pHierDependentOn
IVsHierarchy

中指向 IVsHierarchy 可能依赖的项目的对象的指针 pHier

pfIsDependentOn
Int32

true 如果存在依赖关系,则设置标志,否则设置为 false

返回

Int32

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

注解

COM 签名

从 vsshell:

HRESULT IVsSolutionBuildManager2::QueryProjectDependency(  
   [in] IVsHierarchy *pHier,  
   [in] IVsHierarchy *pHierDependentOn,  
   [out] BOOL *pfIsDependentOn  
);  

此方法可用于检查一个项目是否依赖于另一个项目。 *pfIsDependentOn 是否 true pHier 依赖于 pHierDependentOn

备注

CalculateProjectDependencies如果存在依赖关系为最新的不确定性,应调用。

适用于