Returning values from add-ins

1C:Enterprise and COM type mapping:

  • Values of VT_EMPTY type are mapped to Undefined values. When such a value is passed as a method parameter, the default parameter value is used.
  • Values of VT_I2, VT_I4, VT_BOOL, VT_ERROR, and VT_UI1 types are mapped to integer values, they are stored in lVal.

  • Values of VT_R4, VT_R8, and VT_CY types are mapped to noninteger values, they are stored in dblVal.

  • Values of VT_DATE type are mapped to date values, they are stored in date.

  • Values of VTYPE_BSTR type are mapped to string values, they are stored in bstrVal.

  • Values of VT_ARRAY type are mapped to array values, they are stored in parray.

  • Values of VT_DISPATCH type are mapped to object values, they are stored in pdispVal.

    Warning! VT_DECIMAL, VT_VARIANT, and VT_UNKNOWN types are not supported.

    When a COM object is converted to IDispatch, a check for cyclic calls 1C:Enterprise -> add-in -> 1C:Enterprise and add-in -> 1C:Enterprise -> add-in is performed to ensure correct interaction between the add-in and 1C:Enterprise.

    Add comment