126.96.36.199 ITypeLib::FindName (Opnum 11)
The FindName method retrieves references to types, or type members, contained in the automation type library whose names match a specified string.
HRESULT FindName( [in] LPOLESTR szNameBuf, [in] ULONG lHashVal, [out, size_is(*pcFound), length_is(*pcFound)] ITypeInfo** ppTInfo, [out, size_is(*pcFound), length_is(*pcFound)] MEMBERID* rgMemId, [in, out] USHORT* pcFound, [out] BSTR* pBstrNameInLibrary );
szNameBuf: MUST be a string.
lHashVal: MUST be either the hash value corresponding to the value of szNameBuf (as specified in section 2.2.51), or 0.
ppTInfo: MUST be set to an array of references to ITypeInfo server instances (see section 3.7.4). Each entry of ppTInfo MUST correspond to a type whose name matches the value of szNameBuf according to the string matching criteria (as specified in section 2.2.50) or that contains a member whose name matches the value of szNameBuf.
The array MUST be empty if there are no types or method or data members of types defined in the automation scope whose names match the value of szNameBuf. Otherwise, the array MUST contain one entry for each named nonparameter element defined in the automation scope whose name matches szNameBuf. The array MAY contain entries for matching types or type members that are referenced, but not defined in the automation scope. <62>
The length of the array MUST NOT be greater than the value of pcFound set by the client.
rgMemId: MUST be set to an array of MEMBERIDs (see section 2.2.35) corresponding to the ITypeInfo instances in the ppTInfo array. For each entry in the ppTInfo array, the corresponding value in the rgMemId array MUST specify the MEMBERID of the type member whose name matches the value of szNameBuf, or MEMBERID_NIL to specify that the name of the type matches the value of szNameBuf.
pcFound: The client MUST set pcFound to the maximum number of matches that can be returned. The server MUST set pcFound to the number of elements in the ppTInfo and rgMemId arrays.
pBstrNameInLibrary: MUST be set to a string whose value matches the value of szNameBuf according to the string-matching rules (as specified in section 2.2.50), if the ppTInfo array is not empty. MUST be set to a NULL BSTR otherwise.
If the severity bit is set to 0, the method completed successfully.
If the severity bit is set to 1, the method failed and encountered a fatal error.