Udostępnij przez


IMetaDataImport::EnumCustomAttributes Method

Wylicza niestandardowe tokeny definicji atrybutów skojarzone z określonym typem lub elementem członkowskim.

Syntax

HRESULT EnumCustomAttributes (
   [in, out] HCORENUM      *phEnum,
   [in]  mdToken            tk,
   [in]  mdToken            tkType,
   [out] mdCustomAttribute  rCustomAttributes[],
   [in]  ULONG              cMax,
   [out, optional] ULONG   *pcCustomAttributes
);

Parameters

phEnum [in, out] Wskaźnik zwróconego modułu wyliczającego.

tk [in] Token dla zakresu wyliczenia lub zero dla wszystkich atrybutów niestandardowych.

tkType [in] Token konstruktora typu atrybutów do wyliczenia lub null dla wszystkich typów.

rCustomAttributes [out] Tablica tokenów atrybutów niestandardowych.

cMax [in] Maksymalny rozmiar tablicy rCustomAttributes .

pcCustomAttributes [out, optional] Rzeczywista liczba wartości tokenu zwróconych w pliku rCustomAttributes.

Return Value

HRESULT Description
S_OK EnumCustomAttributes zwrócony pomyślnie.
S_FALSE Nie ma atrybutów niestandardowych do wyliczenia. W takim przypadku pcCustomAttributes wartość to zero.

Requirements

Platformy: Zobacz Obsługiwane systemy operacyjne platformy .NET.

Header: Cor.h

Library: CorGuids.lib

See also