
16
G&
GLIN
TM
Application Programming Interfaces
OLE automation server
The Glink.Auto object makes Glink into an OLE automation server. All Microsoft Office applications, including
Word and Excel, that support the Visual Basic Application language (VBA) are able to act as OLE
automation controllers and drive Glink as an OLE automation server. Your own VBScripts or JScripts
launched from your applications or desktop can also use Glink.Auto. Note that Glink itself can launch your
VBScripts or JScripts, and passes Glink.Auto to the ScriptControl, allowing your script to interact with the
Glink session that launched it.
In this extremely impressive demonstration Glink has been used to start a VBScript. The VBScript takes
control, and drives Glink using the Glink automation server, and also drives a copy of Word using the Word
automation server. The VBScript is able to pick up information from the Glink screen, transfer it into Word,
format it, and even, as here, print the results.
Component Object Model and .NET
Glink provides a COM+ component, Glink.GlinkAPI. All visual development tools (Visual Basic, Visual C,
Visual Java, etc.) recognize the Glink COM+ component, and are able to display the interface to the
developer. Each legacy application screen becomes addressable as a collection of field objects, or as a
string. Your developers can deliver keystrokes and can set up event handlers that will call back the client
application when the given event occurs (connect, disconnect, turn, reception of a specified string or
keyboard sequence). A compatible Java version of the component is available with G&R/Glink for Java.
Glink Professional Edition licenses are per workstation, and allow a Glink.GlinkAPI application to open up to
five simultaneous sessions with legacy applications. For server side application development with more
sessions you need an Enterprise Edition license. A .NET version of the API is available for server-side
development, as explained below in section “Glink on the application server”.
Komentáře k této Příručce