Calling add-in functions

1C:Enterprise and COM type mapping:

  • Values of VT_EMPTY type are mapped to Undefined values.
  • Values of VT_I4 type are mapped to integer values, they are stored in lVal.

  • Values of VT_R8 type are mapped to noninteger values, they are stored in dblVal. Note that the precision of the internal presentation can exceed the precision of a double value (about 15 decimal digits), therefore conversion can lead to a loss of precision.

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

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

  • Values of VT_DISPATCH type are mapped to object values, they are stored in pdispVal. To use a 1C:Enterprise object from the add-in, define the DISPIDs of the object methods in the add-in by calling the GetIDsOfNames() method, and then call Invoke().

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.

Next page: Returning values from add-ins

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.