Partager via


3.7.4.4 ITypeInfo::GetVarDesc (Opnum 6)

The GetVarDesc method retrieves a VARDESC structure that contains information about a member of the ITypeInfo server's data member table.

 HRESULT GetVarDesc(
   [in] UINT index,
   [out] LPVARDESC* ppVarDesc,
   [out] DWORD* pReserved
 );

index: MUST equal the data member table index value of the data member whose description is to be returned. The value of index MUST be less than the value of the cVars field in the TYPEATTR structure returned by the GetTypeAttr method, as specified in 3.7.4.1 and 2.2.44.

ppVarDesc: MUST be set to a VARDESC structure (see section 2.2.43) that contains the data values associated with the specified member of the data member table, or NULL if no such member exists.

pReserved: MUST be set to 0 and ignored on receipt.

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 a value in the following table, a fatal failure occurred.

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

    Return value/code

    Description

    0x8002802B

    TYPE_E_ELEMENTNOTFOUND

    The value of index and invKind did not specify the ordinal position of an element in the method table. See [MS-ERREF].