Executes a COM object's method.
The method's return value.
The CALL service calls an object's method. The Object parameter identifies the instantiated object whose method you wish to call. The Name parameter is the name of the method and is not case sensitive. The remaining parameters passes as parameters to the method.
When dealing with ActiveX controls in OpenInsight, you call methods using the Send_Message method. It gets tricky when you have to pass more than four parameters, as you have to pass them in a dynamic array, like so:
SRP_Com supports up to sixteen individual parameters (more can be added as needed), so the code is more readable and easy to remember:
Note also that, unlike the other services, the CALL service does not have a success/failure return value. Instead, it simply returns the any value returned by the method. You can still use the ERROR service to determine if there was an error, particularly if an unexpected null value is returned. Note, however, that not all methods return a value, in which case a null value is returned.