3.9.4.7 ITypeInfo2::GetParamCustData (Opnum 28)

The GetParamCustData method retrieves the value of a custom data item associated with the specified method parameter.

 HRESULT GetParamCustData(
   [in] UINT indexFunc,
   [in] UINT indexParam,
   [in] REFGUID guid,
   [out] VARIANT* pVarVal
 );

indexFunc: MUST specify an ordinal position in the method table and MUST be less than the value of the cFuncs field in the TYPEATTR structure of the associated type, as specified in sections 2.2.44 and 3.7.4.1.

indexParam: MUST specify an ordinal position in the parameter table of the method specified by indexFunc. The value of indexParam MUST be less than the value of the cParams field in the FUNCDESC structure of the associated method, as specified in sections 2.2.42 and 3.7.4.3.

guid: MUST be the GUID associated with the custom data item using the [custom] attribute, as specified in section 2.2.49.6.

pVarVal: MUST be set to the value of the custom data item, or to VT_EMPTY if the parameter does not have an associated custom data item.

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 indexFunc did not specify the ordinal position of an element in the interface table, or the value of indexParam did not specify the ordinal position of an element in the method's parameter table. See [MS-ERREF].