HRESULT FindName( 
  OLECHAR FAR*  szNameBuf,    
  unsigned long  lHashVal,    
  ITypeInfo FAR* FAR*  ppTInfo,  
  MEMBERID FAR*  rgMemId,     
  unsigned int FAR*  pcFound  
);
 Finds occurrences of a type description in a type library. This may be used to quickly verify that a name exists in a type library.
On exit, indicates the number of instances that were found. If the in and out values of *pcFound are identical, there may be more type descriptions that contain the name.
The return value obtained from the returned HRESULT is one of the following:
| Return value | Meaning | 
|---|---|
| S_OK | Success. | 
| E_OUTOFMEMORY | Out of memory. | 
| E_INVALIDARG | One or more of the arguments is invalid. | 
| TYPE_E_IOERROR | The function could not write to the file. | 
| TYPE_E_INVDATAREAD | The function could not read from the file. | 
| TYPE_E_UNSUPFORMAT | The type library has an older format. | 
| TYPE_E_INVALIDSTATE | The type library could not be opened. | 
| TYPE_E_CANTLOADLIBRARY | The library or .dll file could not be loaded. | 
| TYPE_E_ELEMENTNOTFOUND | The element was not found. | 
Passing *pcFound = n indicates that there is enough room in the ppTInfo and rgMemId arrays for n (ptinfo, memid) pairs. The function returns MEMBERID_NIL in rgMemId[i], if the name in szNameBuf is the name of the type information in ppTInfo[i].