3.9.4.4 ITypeInfo2::GetVarIndexOfMemId (Opnum 25)

The GetVarIndexOfMemId method retrieves the location of an element in the data member table by using the associated MEMBERID of the element.

The method is received by the server in an RPC_REQUEST packet.

 HRESULT GetVarIndexOfMemId(
   [in] MEMBERID memid,
   [out] UINT* pVarIndex
 );

memid: MUST be a MEMBERID, as specified in section 2.2.35. MUST NOT be MEMBERID_NIL.

pVarIndex: MUST be set to the ordinal position in the data member table of the element whose MEMBERID is specified by memid, if such an element exists. If the method returns a failure code, the value MUST be ignored on receipt.

Return Values: The method MUST return information in an HRESULT data structure that 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 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 memid did not specify a member of the type. See [MS-ERREF].