3.11.4.8 ITypeLib::IsName (Opnum 10)

The IsName method indicates whether the specified string matches the name of a type or type member that is contained in the automation type library or its binding context.

 HRESULT IsName(
   [in] LPOLESTR szNameBuf,
   [in] ULONG lHashVal,
   [out] BOOL* pfName,
   [out] BSTR* pBstrNameInLibrary
 );

szNameBuf: MUST be set to a string to be tested if it matches the name of a type or type member.

lHashVal: MUST be either the hash value that corresponds to the value of szNameBuf (as specified in section 2.2.51) or 0.

pfName: MUST be set to TRUE if the specified string matches the name of a type or member that is contained in the automation type library (see section 3.11.4.9) or its binding context (see section 3.5.4.1.1.1) according to the string-matching criteria, as specified in section 2.2.50. Otherwise, MUST be set to FALSE.

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 pfName is TRUE. MUST be set to a NULL BSTR if pfName is FALSE.

Return Values: The method MUST return the information in an HRESULT data structure, which is defined in [MS-ERREF] section 2.1. The severity bit in the structure identifies the following conditions:

  • 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.