Component Enabler uses a number of objects relevant to the current connection. The key objects required are:
A LINCEnvironment object that is the current Component Enabler connection. In the Visual Basic sample code, this is the variable mvarConnection.
An Ispec object that holds an instance of an Ispec. This is generally the last Ispec sent from the application to the Component Enabler client. In the Visual Basic sample code, this is the variable mvarCurrentIspec.
A Status object. This holds any status line messages, errors, or Teach screen information passed back with the Ispec data from the host.
When you use Component Enabler in a non-JavaBean compatible environment, the application must be able to access the Component Enabler LINCEnvironment class as if it were a COM object.
To use a JavaBean as a COM object, you must associate the Javabean with the JVM.
You can then create an instance of the LINCEnvironment class using the syntax:
Set mvarConnection = CreateObject("LINCEnvironment.Java.1")
The complete code to create the initial set of required objects is:
’Create the connection objects Dim mvarConnection As Object Dim mvarStatus As Object Dim mvarLoginAttrsRef As Object Set mvarConnection = CreateObject("LINCEnvironment.JavaStyleJavaSUN.1") ’Build required objects Set mvarStatus = mvarConnection.makeLINCStatus() Set mvarLoginAttrsRef = mvarConnection.makeObjectRef()