Provides COM support in any version of OpenInsight.
The meaning of the return value depends on the service.
|Object||The target COM object. Required.|
|Service||The action to take against the COM object. Required.|
|Name||Identifies the service's target, such as a property name. Optional. Some services require this parameter, others do not. See service topics for details.|
|Param1 - Param16||Optional parameters for COM methods and properties.|
The SRP_Com method was developed to meet a need for accessing COM components from within versions of OI that do not yet have that functionality built in.
Typical usage of COM requires objects to be instantiated, with a handle to the object returned into an OI variable. This parameter requires a handle to an object in order call methods and properties. Note that some methods and properties return new object handles, and those handles can be used to "dig deeper" into the COM object hierarchy.
Much like the Utility function in OpenInsight, the SRP_Com function provides multiple services which are identified in the Service parameter. The services are:
|ADDPARAM||Adds a parameter to an advanced method call for a COM object.|
|BEGINCALL||Begins an advanced method call for a COM object.|
|ENDCALL||Executes an advanced method call for a COM object.|
|CREATE||Instantiates a COM object.|
|RELEASE||Releases a previously instantiated COM object from memory.|
|GET||Gets a COM object's property value.|
|SET||Sets a COM object's property value.|
|CALL||Executes a COM object's method.|
|ERROR||Returns the latest COM error.|
|HANDLES||Gets all open COM object handles.|
Click on the service names above to read more details. Continue below for an explanation of the other parameters.
The Name parameter is used by the CREATE, GET, SET, and CALL services. For other services, it should be blank. For the CREATE service, Name is the ProgId identifying the COM object to instantiate. For the GET and SET services, Name identifies a property. For the CALL service, Name identifies a method.
Param1 - Param16
COM properties and method often require additional parameters. SRP_Com supports up to 16 parameters to be passed. If you encounter a need for more, contact SRP Computer Solutions, Inc. and we will be happy to accommodate you.