IVsSolutionBuildManager2.GetProjectDependencies Yöntem (IVsHierarchy, UInt32, IVsHierarchy[], UInt32 )
Verilen hiyerarşi bağlıdır projelerin bir listesini döndürür.
Ad Alanı: Microsoft.VisualStudio.Shell.Interop
Derleme: Microsoft.VisualStudio.Shell.Interop (Microsoft.VisualStudio.Shell.Interop.dll içinde)
Sözdizimi
int GetProjectDependencies(
IVsHierarchy pHier,
uint celt,
IVsHierarchy[] rgpHier,
uint[] pcActual
)
int GetProjectDependencies(
IVsHierarchy^ pHier,
unsigned int celt,
array<IVsHierarchy^>^ rgpHier,
array<unsigned int>^ pcActual
)
abstract GetProjectDependencies :
pHier:IVsHierarchy *
celt:uint32 *
rgpHier:IVsHierarchy[] *
pcActual:uint32[] -> int
Function GetProjectDependencies (
pHier As IVsHierarchy,
celt As UInteger,
rgpHier As IVsHierarchy(),
pcActual As UInteger()
) As Integer
Parametreler
- pHier
[in] İşaretçi bir IVsHierarchy nesne.
- celt
[in] Belirtir celt.
- rgpHier
[içinde out] Yapı projeleri belirtir.
- pcActual
[Çıkış, isteğe bağlı] Proje numarası işaretçisi.
Dönüş Değeri
Type: System.Int32
Yöntem başarılı olursa, verir S_OK.Başarısız olursa, bir hata kodu döndürür.
Uygulanan
IVsSolutionBuildManager.GetProjectDependencies(IVsHierarchy, UInt32, IVsHierarchy[], UInt32[])
Notlar
com imzası
Vsshell.idl:
HRESULT IVsSolutionBuildManager2::GetProjectDependencies(
[in] IVsHierarchy *pHier,
[in] ULONG celt,
[in, out, size_is(celt)] IVsHierarchy *rgpHier[],
[out, optional] ULONG *pcActual
);
Verilen hiyerarşi bağlıdır projelerin bir listesini döndürür.
Çağırması gerekir CalculateProjectDependencies arama için önce GetProjectDependencies bağımlılıkları arama noktasında güncel olması durumunda değilseniz.CalculateProjectDependenciesproject dependencies hesaplanmasını zorlar.
Bu yöntem ilk kez çağrılması gerektiğini ile zaman celt = 0 ve rgpHier = null, boyut almaya pcActual, sonra projeleri almak için liste ayrılırken sonra ikinci kez.
Yöntem (hata denetimleri atlanmış) aşağıdaki şekilde uygulanacaktır:
ULONG ulActual;
hr = pIVsSolutionBuildManager2->GetProjectDependencies(pHier, 0, NULL, &ulActual)
// allocate memory to hold the hierarchy pointers
IVsHierarchy** rgpIVsHierarchy = (IVsHierarchy**) ::CoTaskMemAlloc(ulActual * sizeof(IVsHierarchy *));
memset(rgpIVsHierarchy, 0, sizeof(IVsHierarchy*)*ulActual);
// now get the hierarchy pointers
ULONG ulActual2;
hr = pIVsSolutionBuildManager2->GetProjectDependencies(pHier, ulActual, rgpIVsHierarchy, &ulActual2);
// use the pointers here
// release the hier pointers
// release the memory
::CoTaskMemFree(rgpIVsHierarchy);
Ayrıca bkz.
IVsSolutionBuildManager2 Arabirim
Microsoft.VisualStudio.Shell.Interop Ad Alanı
Başa dön