IVsProject4.GetFilesWithItemType(String, UInt32, UInt32[], UInt32) Yöntem

Tanım

MSBuild ItemType değeri verilen dizeyle eşleşen bir Vsitemıds dosyası dizisini döndürür. Karşılaştırma büyük/küçük harfe duyarlıdır.

public:
 int GetFilesWithItemType(System::String ^ pszItemType, System::UInt32 celt, cli::array <System::UInt32> ^ rgItemids, [Runtime::InteropServices::Out] System::UInt32 % pcActual);
int GetFilesWithItemType(std::wstring const & pszItemType, unsigned int celt, std::Array <unsigned int> const & rgItemids, [Runtime::InteropServices::Out] unsigned int & pcActual);
public int GetFilesWithItemType (string pszItemType, uint celt, uint[] rgItemids, out uint pcActual);
abstract member GetFilesWithItemType : string * uint32 * uint32[] * uint32 -> int
Public Function GetFilesWithItemType (pszItemType As String, celt As UInteger, rgItemids As UInteger(), ByRef pcActual As UInteger) As Integer

Parametreler

pszItemType
String

ItemType.

celt
UInt32

Döndürülecek dosya sayısı.

rgItemids
UInt32[]

Itemıds dizisi.

pcActual
UInt32

Döndürülen gerçek dosya sayısı.

Döndürülenler

Int32

Yöntem başarılı olursa, döndürür S_OK . Başarısız olursa, bir hata kodu döndürür.

Örnekler

Son derece yaygın bir düzende yöntemi iki kez çağırmak, ilk kez öğe sayısı ve dizi için 0 ' ı geçen ve ikinci kez doğru boyutlu bir diziyi ve gerçek öğe sayısını geçen ve aşağıdaki gibi (okunabilirlik için hata denetimini atlama) bir kez çağırmalıdır:

hr = pIVsProject4->GetFilesWithItemType(szItemType, 0, NULL, &cExpected);  
VSITEMID *rgItemids = ::CoTaskMemAlloc(cExpected * sizeof(VSITEMID));  
hr = pIVsProject4->GetFilesWithItemType(szItemType, cExpected, rgItemids, &cActual);  

Açıklamalar

celtSıfır ise ve rgItemids null ise, eşleşen dosya sayısı ' de döndürülür pcActual . celtSıfır değilse, null olmamalı rgItemids veya E_POINTER döndürülmemelidir.

Şunlara uygulanır