Calling 1C:Enterprise object methods from add-ins

To call an object method, call the Invoke() method of the IDispatch interface (which is received earlier), and pass all required parameters to this method, including the DISPID of the object method being called. You can get the DISPIDs by calling the GetIDsOfNames() method of the IDispatch interface and passing the method name to it.
The object method parameters have a direct correspondence with the VARIANT array of structures: the structure with index 0 corresponds to the first parameter, the structure with index 1 corresponds to the second parameter, and so on. Note that when you pass object method parameters, you have to pass all parameter values, including those having default values. To include all default values automatically, assign the VT_ERROR type to the corresponding VARIANT structure.

Add comment