3.5.4.2 ITypeComp::BindType (Opnum 4)

The BindType method retrieves a reference to an automation type description whose name corresponds to a specified string.

 HRESULT BindType(
   [in] LPOLESTR szName,
   [in] ULONG lHashVal,
   [out] ITypeInfo** ppTInfo
 );

szName: MUST be set to a string.

lHashVal: MUST be the hash value associated with the value of szName as specified in section 2.2.51, or 0. The server MUST return the same values in ppTInfo in either case.

ppTInfo: MUST be set to a reference to an ITypeInfo server instance, or NULL.

If the ITypeComp server is associated with an ITypeLib server, ppTInfo MUST specify a type defined in its automation scope whose name matches the value of szName according to the string-matching criteria specified in section 2.2.50, or be set to NULL if no such type exists.

MUST be set to NULL if the ITypeComp server is associated with an ITypeInfo server.

Return Values: The method MUST return information in an HRESULT data structure, 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.