IVsSolutionBuildManager2.QueryProjectDependency Method

Definition

Checks to see if one project is dependent upon another.

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

Parameters

pHier
IVsHierarchy

[in] Pointer to the IVsHierarchy object of a project to check for dependency on pHierDependentOn.

pHierDependentOn
IVsHierarchy

[in] Pointer to an IVsHierarchy object of a project that pHier may be dependent on.

pfIsDependentOn
Int32

[out] The flag is set true if the dependency relationship exists, otherwise it is set to false.

Returns

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

Remarks

COM Signature

From vsshell.idl:

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

This method can be used to check if one project is dependent on another project. *pfIsDependentOn is true if pHier depends on pHierDependentOn.

Note

You should call CalculateProjectDependencies if there is any uncertainty that the dependencies are up-to-date.

Applies to