3.1.4.2 IDispatch::GetTypeInfo (Opnum 4)

The GetTypeInfo method provides access to the Type description information exposed by the automation server.

 HRESULT GetTypeInfo(
   [in] UINT iTInfo,
   [in] LCID lcid,
   [out] ITypeInfo** ppTInfo
 );

iTInfo: MUST be 0.

lcid: MUST equal the locale ID for the Type description information to be retrieved.

ppTInfo: MUST be set to reference an instance of an ITypeInfo server that corresponds to the default nonsource interface of the coclass implementing IDispatch (see section 2.2.49.8). MUST refer to the partner dispinterface if the default nonsource interface is a dual interface. MUST be set to NULL if the coclass does not specify a default nonsource interface.

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 and the entire HRESULT DWORD does not match the value in the following table, a fatal failure occurred.

  • If the severity bit is set to 1 and the entire HRESULT DWORD matches the value in the following table, a failure occurred.

    Return value/code

    Description

    0x8002000B

    DISP_E_BADINDEX

    SHOULD be returned when the value of the passed in iTInfo argument was not 0. See [MS-ERREF].