Main > Knowledge Base > 1C:Enterprise documentation > Add-in Development Technology > Creating add-ins with COM technology > Using COM VARIANT type in data exchange > Calling 1C:Enterprise object methods from add-ins > 1C:Enterprise documentation > Add-in Development Technology > Creating add-ins with COM technology > Using COM VARIANT type in data exchange > Calling 1C:Enterprise object methods from add-ins > 1C:Enterprise documentation > Add-in Development Technology > Creating add-ins with COM technology > Using COM VARIANT type in data exchange > Calling 1C:Enterprise object methods from add-ins

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.

Next page: COM interfaces of 1C:Enterprise






© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.