You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This SRP FrameWorks utility service is a general purpose error tracking and reporting utility. Unlike OpenInsight error routines, Error_Services does not interfere with normal operations even if a previous error condition was set. The developer is given the right (and responsibility) to make these decisions.

Syntax

Response = Error_Services(Service, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)

Returns

The meaning of the response value depends on the service.

Parameters

ParameterDescription
ServiceThe name of the service being requested. Required.
Param1 - Param10Generic parameters.

Remarks

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.

Object

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.

Service

Much like the Utility function in OpenInsight, the SRP_Com function provides multiple services which are identified in the Service parameter. The services are:

ServiceDescription
CREATEInstantiates a COM object.
RELEASEReleases a previously instantiated COM object from memory.
GETGets a COM object's property value.
SETSets a COM object's property value.
CALLExecutes a COM object's method.
ERRORReturns the latest COM error.

Click on the service names above to read more details. Continue below for an explanation of the other parameters.

Name

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 - Param10

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.

It provides simple services like SetGet, and AddThe Set service always clears any previous error condition before updating the error status whereas the Add service appends the error status.

  • No labels