UCOMITypeLib.FindName(String, Int32, UCOMITypeInfo[], Int32[], Int16) 方法

定义

在类型库中查找类型说明的匹配项。Finds occurrences of a type description in a type library.

public:
 void FindName(System::String ^ szNameBuf, int lHashVal, cli::array <System::Runtime::InteropServices::UCOMITypeInfo ^> ^ ppTInfo, cli::array <int> ^ rgMemId, short % pcFound);
public void FindName (string szNameBuf, int lHashVal, System.Runtime.InteropServices.UCOMITypeInfo[] ppTInfo, int[] rgMemId, ref short pcFound);
abstract member FindName : string * int * System.Runtime.InteropServices.UCOMITypeInfo[] * int[] * int16 -> unit
Public Sub FindName (szNameBuf As String, lHashVal As Integer, ppTInfo As UCOMITypeInfo(), rgMemId As Integer(), ByRef pcFound As Short)

参数

szNameBuf
String

要搜索的名称。The name to search for.

lHashVal
Int32

一个用于加快搜索速度的哈希值,由 LHashValOfNameSys 函数计算。A hash value to speed up the search, computed by the LHashValOfNameSys function. 如果 lHashVal 为 0,则计算一个值。If lHashVal is 0, a value is computed.

ppTInfo
UCOMITypeInfo[]

成功返回时,指向包含在 szNameBuf 中指定的名称的类型说明的指针的数组。On successful return, an array of pointers to the type descriptions that contain the name specified in szNameBuf.

rgMemId
Int32[]

所找到的项的 MEMBERID 数组;rgMemId[i] 是由 ppTInfo[i] 指定的类型说明中建立索引的 MEMBERIDAn array of the MEMBERID 's of the found items; rgMemId [i] is the MEMBERID that indexes into the type description specified by ppTInfo [i]. 不能为 nullCannot be null.

pcFound
Int16

在进入时指示要查找的实例数。On entry, indicates how many instances to look for. 例如,可以调用 pcFound= 1 以查找第一个匹配项。For example, pcFound = 1 can be called to find the first occurrence. 找到一个实例时停止搜索。The search stops when one instance is found.

在退出时指示找到的实例数。On exit, indicates the number of instances that were found. 如果 pcFoundinout 值完全相同,则可能存在其他包含此名称的类型说明。If the in and out values of pcFound are identical, there might be more type descriptions that contain the name.

注解

中必须有足够的空间 rgMemId 来保存 pcFound 条目。There must be enough room in rgMemId to hold pcFound entries.

有关的其他信息 ITypeLib::FindName ,请参阅 MSDN library。For additional information about ITypeLib::FindName, see the MSDN Library.

适用于