GLINK TM G&R PROFESSIONAL EDITION ENTERPRISE EDITION API Reference http://www.glink.
Microsoft, Windows, MS, are registered trademarks of Microsoft Corp. IBM and PC are registered trademarks of IBM Corp. Glink Enterprise Edition, version 8.2 Glink Professional Edition, version 8.2 © Gallagher & Robertson A/S 1987-2009 All Rights Reserved GALLAGHER & ROBERTSON A/S, Kongens gate 23, N-0153 Oslo, Norway Tel: +47 23357800 • Fax: +47 23357801 www: http://www.glink.com/ e-mail: support@glink.
Contents Contents Contents ................................................................................................ i General ................................................................................................ 1 GlinkApi COM+ component .......................................................................... 1 Glink.Auto OLE Automation.......................................................................... 1 DDE (Dynamic Data Exchange)................................................
Contents GlinkApi_SEARCH_FORWARD .......................................................... 38 GlinkApi_SEARCH_BACKWARD....................................................... 39 Method Detail ............................................................................................... 40 addConfiguration..................................................................................... 40 addGlinkEventListener............................................................................ 40 configBase ....
Contents getVariableFieldsEx ................................................................................ 54 isConnected ............................................................................................. 54 isScreenAreaMatch.................................................................................. 54 isSessionAvailable................................................................................... 54 isSplashScreenVisible ............................................................
Contents setCursor.................................................................................................. 69 setGlinkDirectory .................................................................................... 70 setInteractiveComParams ........................................................................ 70 setRestrictedMode ................................................................................... 70 setScreenSize....................................................................
Contents GlinkConfiguration_PROTOCOL_MINITEL ........................................ 80 GlinkConfiguration_PROTOCOL_TCP_RAW...................................... 80 GlinkConfiguration_PROTOCOL_TELNET ......................................... 80 GlinkConfiguration_PROTOCOL_TELNET3270 ................................. 80 GlinkConfiguration_PROTOCOL_TELNET5250 ................................. 80 GlinkConfiguration_PROTOCOL_TNVIP............................................. 80 Constructor Detail .............
Contents getEventCode ........................................................................................ 100 getSource ............................................................................................... 100 getValue................................................................................................. 100 getValueText ......................................................................................... 100 GlinkField class......................................................
Contents item........................................................................................................ 113 refresh.................................................................................................... 114 GlinkKey class ....................................................................................................... 115 Class GlinkKey ........................................................................................... 115 Field Summary ..............................
Contents GlinkKey_PA2 ...................................................................................... 126 GlinkKey_PA3 ...................................................................................... 127 GlinkKey_PA4 ...................................................................................... 127 GlinkKey_PGDN .................................................................................. 127 GlinkKey_PGUP ............................................................................
Contents onGlinkEvent......................................................................................... 135 Glink.Auto OLE Automation ........................................................ 137 Overview ................................................................................................................ 137 Automation Controller ................................................................................ 137 Automation Server ..........................................................
Contents The LoadConfig method........................................................................ 157 The Pattern method................................................................................ 158 The Quit method.................................................................................... 158 The Receive method .............................................................................. 159 The ScriptCommand method.................................................................
Contents The [transfertype] sections.......................................................................... 202 Debugging HLLAPI applications........................................................................... 203 UVTI reference ............................................................................... 205 Files relating to UVTI ............................................................................................ 205 UVTI installation...................................................
Contents xii Glink: API reference manual Gallagher & Robertson
General General GLINK provides both the standard windows APIs (Application Programmable Interface) and the more specific emulator APIs from IBM and Bull. GlinkApi COM+ component COM+ and OLE Automation allows you to manipulate objects from other applications using the Component Object Model (COM). COM defines how objects interact between applications.
General HLLAPI (High-Level Language API) UVTI (Unified Virtual Terminal Interface) The HLLAPI and UVTI APIs are specified by IBM and Bull and give emulation access via DLLs supplied with Glink 2 Glink: API reference manual Gallagher & Robertson
COM+ reference GlinkApi COM+ component Overview COM+ is an evolutionary extension to the Component Object Model making it even easier for developers to create software components in any language, using any visual development tool.
COM+ reference ’Fat-client’ (Glink.GlinkApi) The fat-client GlinkApi COM+ component included in Glink is a single-instance out-of-process server. This means that each time a new GlinkApi object is created a new instance of GL.EXE is started. Each new instance is initially invisible and completely independent from any other instances.
COM+ reference ’Thin-client’ (GlinkApi.GlinkApi) The thin-client GlinkApi COM+ component included in Glink is a multithreaded multi-object out-of-process server. This means that each time a new GlinkApi object is created it is created within the same GLINKAPI.EXE instance and only requires memory allocation for the new object. Each new instance is always invisible and completely independent from any other instances.
COM+ reference Differences between the fat and thin clients The main difference between the fat and thin-client versions of the GlinkApi Com+ object is that the fat-clients Glink.GlinApi object can be displayed by calling the setVisible method. When displayed, the fat-client is GL.EXE. Each new fat-client Glink.GlinkApi object starts the execution of a new instance of Glink. A thin-client GlinkApi.GlinkApi object resides as a single object within the multi-threaded GLINKAPI.
COM+ reference Differences from the Glink for Java version There are very few differences between the Java version of the GlinkApi and this Windows COM+ component version. Source code that has been written for one version should be easy to port to the other. The main difference has to do with GlinkApi session names and configurations, the reason being that the configuration concept is different in Glink for Java to that used by Glink for Windows.
COM+ reference Constant definitions are slightly differently in the Glink for Java and Windows versions due to differences in Java and COM+. In the Windows COM+ version, the constants are global values rather than part of the actual class, so Java syntax with a dot such as GlinkEvent.CONNECTED or GlinkKey.HOME become GlinkEvent_CONNECTED and GlinkKey_HOME. This applies to all the defined constants, e.g.
COM+ reference in your visual development tool will normally allow the tool to display the GlinkApi methods, properties and events as you program. It also allows syntax checking at compile time. How you include the TLB definitions in your program is tool-dependent. Using GlinkApi with MS Visual Basic VB needs to load GlinkApi VTable Type Library (TLB) definition to be able to display the GlinkApi methods, properties and events as you program.
COM+ reference If you are going to use the GlinkApi's events, then you must use the WithEvents keyword. However, when using the WithEvents keyword you cannot use the New keyword and will need to create the object at runtime: Dim WithEvents glapi as Glink.GlinkApi Private Sub Form_Load() Set glapi = New Glink.GlinkApi 'or Set glapi = CreateObject("Glink.GlinkApi") End Sub Once the object is created you can use any method or property directly. Set glapi = New Glink.GlinkApi glapi.SessionName ("my config.
COM+ reference Private Sub DumpField(fld As Glink.GlinkField) Dim t As String If TypeOf fld Is Glink.GlinkField Then t = fld.getString If fld.isProtected Then List1.AddItem ("Protected Field : " + t) Else List1.AddItem ("Variable Field: " + t) End If List1.AddItem ("X: " + Str(fld.getStart.X)) List1.AddItem ("Y: " + Str(fld.getStart.Y)) List1.AddItem ("L: " + Str(fld.getLength)) List1.AddItem ("A: " + Hex(fld.
COM+ reference Private Sub glapi_onGlinkEvent(ByVal glevent As Glink.IGlinkEvent) Dim Val As Integer Dim Ev As Integer ' ' List1.AddItem ("Glevent text is: ") List1.AddItem (glevent.getValueText) Ev = glevent.getEventCode Val = glevent.getValue If Ev = GlinkEvent_STARTED Then List1.AddItem ("glevent: STARTED") GlStarted = True ElseIf Ev = GlinkEvent_STOPPED Then List1.AddItem ("glevent: STOPPED") GlStarted = False ElseIf Ev = GlinkEvent_CONNECTED Then List1.
COM+ reference Private Dim Dim Dim Dim Sub UpdateScreenContent() R, I As Integer startline As GlinkPoint endline As GlinkPoint S As String Set startline = glapi.GlinkPoint(1, 1) Set endline = glapi.GlinkPoint(80, 1) R = glapi.getRows I = 1 List2.Clear While I <= R startline.Y = I endline.Y = I S = glapi.getString(startline, endline) List2.
COM+ reference Using GlinkApi with Borland Delphi Delphi needs to load the GlinkApi VTable Type Library (TLB) definition to be able to display the GlinkApi methods, properties and events as you program. Including the GlinkApi definition is done via the Project/Import type library... menu, which displays a list of libraries that are available. The GlinkApi type library reference is called "Glink Professional, COM+ and Automation Library" and is located in the GL.EXE file.
COM+ reference procedure TForm1.DumpCursor (const cursor : IGlinkPoint); begin if Cursor = nil then Exit; Listbox1.Items.Add('X: '+IntToStr(Cursor.X)); Listbox1.Items.Add('Y: '+IntToStr(Cursor.Y)); end; procedure TForm1.DumpField (const Field : IGlinkField); var S : string; cursor : IGlinkPoint; begin if Field = nil then Exit; cursor := Field.getStart; DumpCursor(cursor); S := Field.getString; Listbox1.Items.Add('S: ' + S); end; procedure TForm1.
COM+ reference Field : IGlinkField; begin if Fields = nil then Exit; Count := Fields.getCount; Listbox1.Items.Add('Number of fields: '+IntToStr(Count)); if Count = 0 then Exit; for I := 1 to Count do begin Listbox1.Items.Add('Field index: '+IntToStr(I)); Field := Fields.item(I); DumpField(Field); end; end; procedure TForm1.Button6Click(Sender: TObject); var I, Count : integer; Fields : IGlinkFields; Field : IGlinkField; cursor : IGlinkPoint; S : string; begin Fields := GlinkApi1.
COM+ reference Field := Fields.item(I + 1); if Field = nil then Exit; Field.setString ('Phil'); Field := Fields.findByString('Enter password', cursor, 24*80, GlinkApi_SEARCH_FORWARD, false); if Field = nil then Exit; I := Fields.getFieldIndex (Field); Field := Fields.item(I + 1); if Field = nil then Exit; Field.setString ('Password'); Fields.refresh; DumpFields(Fields); end; procedure TForm1.
COM+ reference end; begin startPt := glinkapi1.GlinkPoint(17, 6); endPt := glinkapi1.GlinkPoint(30, 6); sArea := glinkapi1.GlinkScreenArea(startPt, endPt, true, 'identification'); glinkapi1.
COM+ reference procedure TForm1.SetupSession(sesstype: integer); var V : Variant; I, N : Integer; Conf : IGlinkConfiguration; begin case sesstype of (* We select a predefined Glink config file 'my config.glinkconfig' *) 1 : GlinkApi1.SessionName ('my config'); (* We select the first in the available list *) 2 : begin V := GlinkApi1.getAvailableSessions; if not VarIsNull(V) and not VarIsEmpty(V) then begin N := VarArrayHighBound(V, 1); (* just list all we get *) for I := 0 to N do Listbox1.Items.
COM+ reference procedure TForm1.GlinkApi1onGlinkEvent(Sender: TObject; var glevent: OleVariant); begin end; To enable the event handler, add the following after the GlinkApi object creation and before starting the session: GlinkApi1 := TGlinkApi.Create(Self); GlinkApi1.OnonGlinkEvent := GlinkApi1onGlinkEvent; GlinkApi1.
COM+ reference Here is an example of a simple GlinkApi event handler: procedure TForm1.GlinkApi1onGlinkEvent(Sender: TObject; var glevent: OleVariant); var S : string; C : string; E : integer; V : integer; GlApi : IGlinkApi; Ev : IGlinkEvent; begin Ev := IDispatch(event) as IGlinkEvent; E := Ev.getEventCode; V := Ev.getValue; GlApi := IDispatch(Ev.getSource) as IGlinkApi; if E = GlinkEvent_ERROR_DETECTED then S := 'ERROR_DETECTED: '+event.
COM+ reference end; end; if E = GlinkEvent_STARTED then S := 'STARTED' else if E = GlinkEvent_STOPPED then begin S := 'STOPPED'; GlinkApi1.
COM+ reference Creating or modifying configuration parameters Modifying Glink configuration options, must be done before calling the GlinkApi.start method. You must first create a GlinkConfiguration object, either from an existing Glink configuration file or a default, depending on the name you supply as the first parameter. Once the object is created, you can modify any of the documented parameters using the GlinkConfiguration.setParameter method.
COM+ reference Dim WithEvents glapi As Glink.GlinkApi Dim glconf As Glink.GlinkConfiguration Set glapi = New Glink.GlinkApi Set glconf = glapi.GlinkConfiguration ("My new TP8 config", GlinkConfiguration_EMULATION_VIP7804, GlinkConfiguration_PROTOCOL_GGATE_DSA_CXI, "ggate.gar.no") glconf.setParameter("print.type=GlinkApi") glapi.addConfiguration glconf glapi.sessionName (glconf.getName) glapi.start glapi.notifyString "LOGICAL ID--", False, 1, True glapi.setVisible (True) etc...
COM+ reference Glink.GlinkApi summary Class Summary GlinkApi This is the main class for the API interface to Glink. GlinkConfiguration This class enables you to create a configuration used to set the necessary parameters for connecting to a given host application. GlinkEvent Identifies the type of events that a GlinkEventListener may receive. GlinkField A field is the fundamental element of a virtual screen. GlinkFields GlinkFields contains a collection of the fields in the virtual screen.
COM+ reference GlinkApi class Class GlinkApi GlinkApi ªGlinkApi class GlinkApi This is the main class for the API interface to Glink. The class is contained in the glink.jar file delivered. The Java class path must be adjusted so this jar file can be found. To start Glink from an application, create a GlinkApi object and supply the user name, password and session name with the userName, userPassword and sessionName methods. Then call the start method to launch Glink.
COM+ reference Methods marked as Java only, indicated that they only appliy to Glink for Java and are irrelevant, unsupported of ignored by the Windows versions of Glink. Field Summary static int GlinkApi_ASCII_TO_EBCDIC Specifies translation direction for translateBuffer(): ASCII to EBCDIC. static int GlinkApi_EBCDIC_TO_ASCII Specifies translation direction for translateBuffer(): EBCDIC to ASCII. static int GlinkApi_SCREEN_FORMATTED Specifies that one ore more fields are defined for the current screen.
COM+ reference void addGlinkEventListener(GlinkEventListener listener) Specifies the listener which is to receive Glink events. void configBase(String configBase) Sets the Glink configuration directory when running without a Glink Config Server. void configLanguage(String lkey) Specifies the language file to use for fixed texts. void configServer(String address) Specifies the IP address or host name of the computer where the Glink server is installed and running.
COM+ reference Sets the Glink file base directory. GlinkPoint findString(String string, GlinkPoint start, int length, int direction, boolean caseSensitive) Searches the text plane for the given string. void flushGlinkEvents Flushes the GlinkEvent queue. int[ ] getAttributes(GlinkPoint start, int len) Returns the attributes for the target area int[ ] getAttributes(GlinkPoint start, GlinkPoint end) Returns the attributes for the target area Collection getAvailableSessions() Returns the sessions configured.
COM+ reference byte[ ] getDataBytes(GlinkPoint start, GlinkPoint end) Returns the screen characters for the target area in the character set used internally by Glink int getDataLength(GlinkPoint start, GlinkPoint end) Returns the length for the target area. int getDefaultColorAttribute() Returns the default color attribute settings. int getEmulationType() Returns the current emulation type. GlinkFields getFields() Returns the GlinkFields object associated with the current screen.
COM+ reference Returns the number of rows in the presentation space. GlinkScreenArea getScreenArea(GlinkPoint start, GlinkPoint end, boolean rectangle) Returns an object for the given screen area or null if the positions given are not within the current screen. String getScreenCharacterSet () Returns the name of the screen character set configured. int getScreenMode() If the host application has used field attributes to define fields on the screen, then the current screen is formatted.
COM+ reference boolean isScreenAreaMatch(GlinkScreenArea sa) Returns true if the supplied GlinkScreenArea object matches the current screen. boolean isSessionAvailable(String name, Collection sessions) Returns true if the given session is available. boolean isSplashScreenVisible() Returns true if the splash screen is visible. boolean isStarted() Returns true if Glink has started.
COM+ reference void messageModeOn(int bufsize, boolean processHostData) This method instructs Glink to start message mode operation. String messageModeReceive() This method returns the string of characters received from the host since the last time this method was called. byte[ ] messageModeReceiveBytes() This method returns the byte array received from the host since the last time this method or messageModeReceive() was called.
COM+ reference void notifyKey(int key) Instructs Glink to fire a GlinkEvent_KEY_TYPED event when the given key is typed. void notifyScreenArea(GlinkScreenArea screenArea, int identity, boolean removeAfterwards) Instructs Glink to fire a GlinkEvent_SCREEN_AREA_MATCH event when the given object matches the current screen.
COM+ reference boolean removeNotifyScreenArea(int identity) Removes the GlinkScreenArea object associated with the given identity from the list of objects being checked for a match. boolean removeNotifyString(int identity) Removes the string associated with the given identity from the list of strings being checked for. boolean restoreScreenContent (String fileName) Restores the screen previously saved. boolean saveScreenContent (String fileName) Saves the current screen content to the file specified.
COM+ reference void serverPort(String port) Set the IP port on which to connect to the Glink server. boolean sessionName(String name) Specifies the name of the session to which Glink should connect. void setCursor(int x, int y) Moves the cursor to the given position. void setCursor(GlinkPoint location) Moves the cursor to the given position. void setGlinkDirectory(String glinkDir) Set the Glink directory. void setInteractiveComParams (Collection params) Sets the interactive communication parameters.
COM+ reference Specifies whether Glink should be visible. void start() Starts Glink. void stop() Stops Glink. void traceMethods(boolean trace) Instructs the API to log the methods being called. String translateBuffer(String buffer, int direction) Translate a string between ASCII and EBCDIC. void userName(String name) Specifies the user name. void userPassword(String password) Specifies the password for the user.
COM+ reference Field Detail GlinkApi_ASCII_TO_EBCDIC static int GlinkApi_ASCII_TO_EBCDIC Specifies translation direction for translateBuffer(): ASCII to EBCDIC. GlinkApi_EBCDIC_TO_ASCII static int GlinkApi_EBCDIC_TO_ASCII Specifies translation direction for translateBuffer(): EBCDIC to ASCII. GlinkApi_SCREEN_FORMATTED static int GlinkApi_SCREEN_FORMATTED Specifies that one ore more fields are defined for the current screen.
COM+ reference GlinkApi_SEARCH_BACKWARD static int GlinkApi_SEARCH_BACKWARD Specifies the search direction for the findString method.
COM+ reference Method Detail addConfiguration void addConfiguration(GlinkConfiguration glinkConfiguration) Adds the configuration to the list of available sessions. Restricted See also: sessionName(String), GlinkConfiguration addGlinkEventListener void addGlinkEventListener(GlinkEventListener listener) Specifies the listener which is to receive Glink events.
COM+ reference Specifies the language file to use for fixed texts. This determines the language used in menus, dialogs, message boxes and status line. Normally the value should be a two-letter abbreviation specifying the language; the default value is us. Glink looks for a file glink_xx.txt, where xx is the value of this parameter, in the .../no/gar/data directory. Restricted Parameters: lkey - The 2-letter language key to use. Default is "us".
COM+ reference Start or restart Glink debugging, send output to a file. If debug was already running it is restarted, and subsequent debugging output is sent to debugFile. If debugging wasn't running it is started. Restricted Parameters: debugStream - destination file for debug output. See also: debugStop() debugStop void debugStop() Stop Glink debugging. Restricted See also: debugStart(String) disconnect void disconnect() Disconnects the current session.
COM+ reference fieldRead String fieldRead(int fieldNum) Returns the data for the given variable field. Parameters: fieldNum - The variable field number where 1 is the first variable field and 0 means the current field. Returns: The field value. fileBase void fileBase(String fileBase) Sets the Glink file base directory. Glink needs some files located in the 'no' directory, normally located as a subdirectory of the directory where the 'glink.jar' file is found.
COM+ reference startPos - The row and column in which to start. The position is inclusive (for example, row 1, col 1 means that position 1,1 will be used as the starting location and 1,1 will be included in the search). length - The length from startPos to include in the search.
COM+ reference length - The length (number of attributes integer) from startPos. See also: Attribute format. getAttributes int[ ] getAttributes(GlinkPoint start, GlinkPoint end) Returns the attributes for the target area See also: getAttributes(GlinkPoint, int), Attribute format. getAvailableSessions Collection getAvailableSessions() Returns the sessions configured.
COM+ reference getColumns int getColumns() Returns the number of columns in the presentation space. Returns: The number of columns. getCommunicationProtocol int getCommunicationProtocol() Returns the current communication protocol. Returns: The communication protocol value defined int the GlinkConfiguration class or 1 if Glink is not connected. See also: GlinkConfiguration getCursor GlinkPoint getCursor() Returns the current cursor position. Returns: The cursor position.
COM+ reference getDataLength int getDataLength(GlinkPoint start, GlinkPoint end) Returns the length for the target area. getDefaultColorAttribute int getDefaultColorAttribute() Returns the default color attribute settings. For example, the following call gets the RGB value for the default background color: getBackgroundColor(getDefaultColorAttribute()); Returns: The default color attribute settings. The foreground color is given in bits 0-3 the and background color is given in bits 4-6.
COM+ reference See also: GlinkField, getFields() getFieldsEx GlinkFields getFieldsEx() Returns the GlinkFields object associated with the current screen. GlinkFields contains all the fields in the current screen. For formatted screens, this method will return the very same as the getFields() method. For unformatted screens where no fields are defined, this method will simulate that one or more fields are defined.
COM+ reference Returns the first GlinkEvent available from the GlinkEvent queue. Use the queueGlinkEvents method to enable GlinkEvents queuing. The GlinkEvents queuing can be used instead of a GlinkEvent listener to get hold of GlinkEvents. If the eventCode parameter is set to 0, the first available GlinkEvent is returned. If the eventCode is set to a valid GlinkEvent code, then other GlinkEvents queued are flushed and the specified GlinkEvent is returned if available.
COM+ reference The Ggate and DSA communication modules may be configured with parameters that should be supplied or modified by the user when connecting to the host application. These parameters are referred to as interactive communication parameters. If the current communication module is configured with such interactive parameters and Glink itself is not visible (glink.setVisible(false)), then the GlinkEvent_INTERACTIVE_COM_PARAMS_REQUESTED is posted.
COM+ reference Returns a screen area object for the current screen selection. The method checks the current screen and if any text is marked, returns a GlinkScreenArea object for the marked text. Please note that Glink supports two modes of marking; marking line-by-line and rectangular marking. Use GlinkScreenArea.isRectangle() to check the marking mode used. Returns: A GlinkScreenArea object describing the marked area or null if no text has been marked.
COM+ reference rectangle - Supply true to get a rectangle area and false to get an area that is on a line-by-line basis from the given start position. Returns: A GlinkScreenArea object for the given area See also: getMarkedScreenArea(), notifyScreenArea( GlinkScreenArea, int, boolean), isScreenAreaMatch(GlinkScreenArea) getScreenCharacterSet String getScreenCharacterSet () Returns the name of the screen character set configured.
COM+ reference Restricted getString String getString() Returns the entire text plane of the presentation space as a string. All null characters and field attribute characters are returned as space characters. Returns: The entire text plane as a string getString String getString(GlinkPoint start, GlinkPoint end) Returns the text at the given location in the presentation space as a string. All null characters and field attribute characters are returned as space characters.
COM+ reference getVariableFieldsEx GlinkFields getVariableFieldsEx() Returns the GlinkFields object associated with the current screen with variable fields only. In other words only unprotected fields are contained in the returned GlinkFields object. For formatted screens, this method will return the very same as the getVariableFields() method. For unformatted screens where no fields are defined, this method will simulate that one input field is defined.
COM+ reference isSplashScreenVisible boolean isSplashScreenVisible() Returns true if the splash screen is visible. See also: setSplashScreenVisible(boolean) isStarted boolean isStarted() Returns true if Glink has started. See also: start() isTurnKnown boolean isTurnKnown() Returns true if Glink is connected to a host and the communication module in use knows about which side has the turn to send, either the host side or the Glink side.
COM+ reference isVisible boolean isVisible() Returns true if the Glink screen is visible. See also: setVisible(boolean) markScreenArea void markScreenArea(GlinkPoint start, GlinkPoint end, boolean rectangle) This method marks the given screen area. Glink supports two modes of marking; marking done on a line-by-line basis and rectangular marking. Parameters: start - The starting position (1,1 is the upper left corner). Screen marking is removed by supplying an invalid screen position , for example (0,0).
COM+ reference overwrite - if true, Glink overwrites the message mode receive buffer when it has reached its limit, if false, Glink waits until one of the messageModeReceive methods are called to clear the buffer. See also: messageModeReceive(),messageModeReceiveBytes(), messageModeReceiveBytesSync(), messageModeReceiveSync(), messageModeBufferOverwrite(boolean), emulate(String) messageModeOff void messageModeOff() This method turns message mode off.
COM+ reference See also: messageModeReceive(),messageModeReceiveSync(int maxlen), messageModeBufferOverwrite(boolean), emulate(String) messageModeReceive String messageModeReceive() This method returns the string of characters received from the host since the last time this method was called. Glink must be in message mode operation for this call to return any data.
COM+ reference The method will check the turn first and if the turn is at the host side, it will wait until the requested number of characters has been received from the host and return these as a byte array. If less characters have been received when turn is received, then these characters are returned. When no more data is available, a null pointer is returned.
COM+ reference Returns: The string of character received or null if no data is available See also: messageModeReceive(),messageModeReceiveBytes(), messageModeReceiveBytesSync(), messageModeBufferOverwrite(boolean), emulate(String)GlinkEvent_MESSAGE_MODE_DATA, messageModeOn(int, boolean),isTurnKnown(), isTurnReceived() messageModeSend void messageModeSend(String s, boolean passTurn) This method bypasses the Glink emulation and sends the string directly to the host.
COM+ reference See also: messageModeSendBytes() messageModeSendBytes void messageModeSendBytes(byte[ ] s, int offset, int len, boolean passTurn) This method bypasses the Glink emulation and sends a byte array directly to the host. Several data buffers may be sent without giving up the turn. The passTurn flag is used to signal that this is the end of the data and that the turn should be passed to the host side. The data is assumed to be in the host native character set.
COM+ reference noScreen void noScreen() This method instructs Glink to start without the Glink screen display class. If a number of Glink sessions are started without using the Glink display at all, performance will be improved by setting this parameter. Please note that if you just want to hide the screen display, use the setVisible method instead to switch the Glink display on and off.
COM+ reference key - The key to be notified. See also: removeNotifyKey(int), GlinkEvent.KEY_TYPED notifyScreenArea void notifyScreenArea(GlinkScreenArea screenArea, int identity, boolean removeAfterwards) Instructs Glink to fire a GlinkEvent.SCREEN_AREA_MATCH event when the given object matches the current screen. Several objects may be waited for, each with its own identity value. The objects are checked each time Glink receives the turn. For some host connections turn signals are not generated.
COM+ reference Instructs Glink to fire a GlinkEvent_STRING_RECEIVED event when the given string is received from host. Several strings may be waited for, each with its own identity value. The check is performed before the received data is processed by the emulation module of Glink. Use the notifyScreenArea method instead if you want the check to be performed after the received data has been processed by Glink. Parameters: string - The string for which a notification is to be sent.
COM+ reference See also: getGlinkEvent(int, long), flushGlinkEvent(), GlinkEvent addGlinkEventListener( GlinkEventListener) removeConfiguration void removeConfiguration(GlinkConfiguration glinkConfiguration) Removes the configuration previously set with the addConfiguration method. Restricted See also: addConfiguration( GlinkConfiguration) removeGlinkEventListener void removeGlinkEventListener(GlinkEventListener listener) Removes the specified listener set with the addGlinkEventListener method.
COM+ reference removeNotifyScreenArea boolean removeNotifyScreenArea(int identity) Removes the GlinkScreenArea object associated with the given identity from the list of objects being checked for a match. If you only want to be notified the first time the object matches the current screen, you may set the "removeAfterwards" parameter in the notifyScreenArea call itself rather than using this call. Parameters: identity - Identifies the GlinkScreenArea object to be removed.
COM+ reference restoreScreenContent boolean restoreScreenContent (String fileName) Restores the screen previously saved. The operation will fail if the given file does not exists, the file has not been created by the saveContentScreen method or the current emulation type does not match the saved one. Returns: If the operation fails, a GlinkEvent_ERROR_DETECTED will be posted with the error type code GlinkEvent_VE_EMULATION_ERROR and additional error type text.
COM+ reference Parameters: fileName - If the script is stored with the Glink Config Server specify: "server://filename" otherwise supply a full path name. scriptTerminate void scriptTerminate() Terminates the current script. sendCommandKey void sendCommandKey(int key) The sendCommandKey method sends a "command" keystroke to the virtual screen. These command keys can be thought of as special keystrokes, like the Enter key, the Tab key or the Page Up key.
COM+ reference serverPort void serverPort(String port) Set the IP port on which to connect to the Glink server. Restricted; Java only Parameters: port - decimal port number. sessionName boolean sessionName(String name) Specifies the name of the session to which Glink should connect. If the session is not specified, Glink will bring up the Glink Session dialog box for the user to make a selection. Restricted Parameters: name - name of configuration profile.
COM+ reference See also: getCursor() setGlinkDirectory void setGlinkDirectory(String glinkDir) Set the Glink directory. Restricted; Java only Parameters: glinkDir - Glink directory. glink.ini.glinkdat (formerly glink.ini) should be stored here. setInteractiveComParams void setInteractiveComParams (Collection params) Sets the interactive communication parameters.
COM+ reference Switch restricted mode on or off. In Restricted mode, methods marked as Restricted will silently do nothing. A key is required to switch restricted mode on, and the same key must be provided to exit restricted mode. Parameters: key - this key is memorized when switching restricted mode on, and must match to exit restricted mode. level - switch restricted mode off if 0, on if != 0. Returns: true if operation succeeded, otherwise false.
COM+ reference See also: sendKeys(String) setSplashScreenVisible void setSplashScreenVisible(boolean visible) Specifies whether the splash screen should be visible. Java only setVisible void setVisible(boolean visible) Specifies whether Glink should be visible. start void start() Starts Glink. The GlinkEvent_STARTED event code is posted when Glink is started. Restricted stop void stop() Stops Glink. The GlinkEvent.STOPPED event code is posted when Glink is stopped.
COM+ reference See also: getTracedMethod() translateBuffer String translateBuffer(String buffer, int direction) Translate a string between ASCII and EBCDIC. This is a utility method for general-purpose use. Parameters: buffer - String to translate. direction - how to translate. Returns: translated string. See also: ASCII_TO_EBCDIC, EBCDIC_TO_ASCII userName void userName(String name) Specifies the user name. If the name is not specified or is not valid, Glink will bring up the Glink Logon dialog box.
COM+ reference Specifies the password for the user. Note that this password is only used to access the Glink configuration database and is not used to log on to the host. If the password is not specified or is not valid, Glink will bring up the Glink Logon dialog box. Restricted; Java only Parameters: password - user’s password.
COM+ reference GlinkConfiguration class Class GlinkConfiguration GlinkApi ªGlinkConfiguration class GlinkConfiguration This class enables you to create a configuration used to set the necessary parameters for connecting to a given host application. Normally the administration program is used to create and manage various configurations (session descriptions). But configurations can also be created on the fly with this class. They are made available to GlinkApi objects with its addConfiguration method.
COM+ reference See also: GlinkApi.addConfiguration( GlinkConfiguration), GlinkApi.
COM+ reference This constructor creates a configuration with the given emulation and host protocol and the address to the host. If the name points to a valid Glink configuration file then it will be used for the default values. Any subsequent setParameter() calls will override these options. Method Summary String getName() Returns the name of the configuration. String getProfileName(int type) Returns the name of the profile with the given type. This method has no effect in the Windows version.
COM+ reference Field Detail GlinkConfiguration_EMULATION_3270 static int GlinkConfiguration_EMULATION_3270 GlinkConfiguration_EMULATION_5250 static int GlinkConfiguration_EMULATION_5250 GlinkConfiguration_EMULATION_ANSI static int GlinkConfiguration_EMULATION_ANSI GlinkConfiguration_EMULATION_DKU static int GlinkConfiguration_EMULATION_DKU GlinkConfiguration_EMULATION_MINITEL static int GlinkConfiguration_EMULATION_MINITEL GlinkConfiguration_EMULATION_TTY static int GlinkConfiguration_EMULATION_TTY G
COM+ reference GlinkConfiguration_OVERRIDE_PARAMS static string GlinkConfiguration_OVERRIDE_PARAMS Special GlinkConfiguration name used as a generic parameter override. If you add a GlinkConfiguration with this name to the API object, the parameters it contains will always override the corresponding parameters loaded from the standard Glink configuration database, regardless of the session name in use.
COM+ reference GlinkConfiguration_PROTOCOL_GGATE_DSA static int GlinkConfiguration_PROTOCOL_GGATE_DSA GlinkConfiguration_PROTOCOL_GGATE_DSA_CXI static int GlinkConfiguration_PROTOCOL_GGATE_DSA_CXI GlinkConfiguration_PROTOCOL_GTEA static int GlinkConfiguration_PROTOCOL_GTEA GlinkConfiguration_PROTOCOL_MINITEL static int GlinkConfiguration_PROTOCOL_MINITEL GlinkConfiguration_PROTOCOL_TCP_RAW static int GlinkConfiguration_PROTOCOL_TCP_RAW GlinkConfiguration_PROTOCOL_TELNET static int GlinkConfiguration_P
COM+ reference See also: setProfileName, setParameter Gallagher & Robertson Glink: API reference manual 81
COM+ reference Method Detail getName String getName() Returns the name of the configuration. getProfileName String getProfileName(int type) Returns the name of the profile with the given type. Normally this name will be the same as the name of the configuration itself. setParameter void setParameter(String parameter) Sets the specific parameter with the given value. For example; setParameter("screen.fontsize=16") or setParameter("emu.vipinittext=false").
COM+ reference name. G&R Ggate protocol parameters. See Ggate documentation for details. Name com.ggateda com.ggatedn com.ggatedu com.ggatepw com.ggatedp com.ggatedb com.ggatehm com.ggatetm com.ggateur com.ggatedx com.ggatemn com.ggatelm com.ggateextra com.
COM+ reference TN5250 parameters. Name com.tn5250maindevice Type String com.tn5250altdevice String com.tn5250usedevname Boolean Description Primary 5250 device name, as specified in the "5250 Telnet Enhancements" IETF draft Alternate 5250 device name, as specified in the "5250 Telnet Enhancements" IETF draft if true, send device name as specified in the "5250 Telnet Enhancements" IETF draft Generic emulation parameters Name emu.autotabl emu.autotabh emu.destructbs emu.nostatusline emu.host8bit emu.
COM+ reference emu.etxsend Boolean emu.ftcsack, emu.ftcspgof, emu.ftcsnak String of the platform. if true, send ETX using ETX character (0x03), otherwise use EOT (0x04) Ack, Page Overflow and Nak responses in TCS forms mode. Should be 'a', 'b' and 'c' respectively. DKU emulation parameters Name emu.dkublinkav Type Boolean emu.dkublinkshow Boolean emu.dkucud Boolean emu.dkucuf emu.dkunewline Boolean Boolean emu.dkusdpatt emu.dkuwrap Boolean Boolean emu.dkuwraptab Boolean emu.dkuinitroll emu.
COM+ reference emu.vipinittext emu.vipenqstring emu.vipextstatus Boolean String Boolean emu.vipscrewyforms Boolean emu.vipstickyroll Boolean emu.vipaddlfs emu.vipnostatusline emu.viptxretmode Boolean Boolean Boolean emu.vipinitecho emu.vipinitroll emu.vipinitblock emu.vipnoprintff Boolean Boolean Boolean Boolean emu.vipsuppresslock emu.vipspacesuppress Boolean Boolean emu.vipaddcrlfs Boolean emu.vipnlafterxmit emu.vipsuppressapcmd Boolean Boolean emu.vipv7200a Integer emu.
COM+ reference emu.vtanswerb String ANSI answerback string IBM 3270 emulation parameters Name emu.ibm3270nxlit Type Boolean emu.ibm3270noprint emu.ibm3270model Boolean Integer emu.ibm3270xlit Integer Description if true, use Norwegian ASCII translation if true, host print is disabled 3270 model.
COM+ reference Integer emu.ibm5250xlit Language to use for EBCDIC/ASCII transliteration.
COM+ reference Print parameters Name print.type Type String Description Type of printer. Values are Local, LPD, File, GlinkApi, None. Parameters: parameter - The string contains both the name of the parameter and its value. setProfileName void setProfileName(int type, String name) Sets the profile of the given type to be used with this configuration. Sometimes it may be more convenient to refer to a profile already created by the Glink Administration utility than setting a number of parameters.
COM+ reference GlinkEvent class GlinkApi ªGlinkEvent class GlinkEvent Identifies the type of events that a GlinkEventListener may receive. A GlinkEvent gets delivered whenever a Glink event has occured. The eventCode contains the event type and the source of the GlinkApi object that generated the event. See also: GlinkEventListener Field Summary static int GlinkEvent_COMMAND_KEY_TYPED A command key has been typed.
COM+ reference static int GlinkEvent_PRINT_DATA Notifies that print data is available. static int GlinkEvent_PRINT_STARTED Notifies that print has started but not available yet. static int GlinkEvent_SCREEN_AREA_MATCH The getValue method returns the GlinkScreenArea identity value. static int GlinkEvent_STARTED static int GlinkEvent_STOPPED static int GlinkEvent_STRING_RECEIVED The getValue method returns the string identity value.
COM+ reference Error type: User name or user password is missing or wrong. static int GlinkEvent_VE_NO_API_LICENSE Error type: License key allowing use of the API not found. static int GlinkEvent_VE_NO_CNX_LICENSE Error type: License key allowing use of connector not found. static int GlinkEvent_VE_OUT_OF_MEMORY Error type: The Java VM reported out of memory when loading Glink. static int GlinkEvent_VE_SESSIONS_ERROR Error type: The GlinkApi.getAvailableSessions failed.
COM+ reference String getValueText() Some Glink events have additional text information about the given event.
COM+ reference Field Detail GlinkEvent_COMMAND_KEY_TYPED static int GlinkEvent_COMMAND_KEY_TYPED A command key has been typed. The getValue method returns the value of the command key. See also: GlinkApi.notifyCommandKey(int), GlinkKey, getValue() GlinkEvent_CONNECTED static int GlinkEvent_CONNECTED GlinkEvent_DISCONNECTED static int GlinkEvent_DISCONNECTED GlinkEvent_ERROR_DETECTED static int GlinkEvent_ERROR_DETECTED The getValue method returns the error code.
COM+ reference glink.setInteractiveComParams(glink.getInteractiveComParams()); for Glink to continue the connecting process. See also: GlinkApi.getInteractiveComParams() GlinkApi.setInteractiveComParams(Collection) GlinkEvent_KEY_TYPED static int GlinkEvent_KEY_TYPED A key has been typed. The getValue method returns the value of the key as an integer. The getValueText method returns the value of the key as a one character long string. See also: GlinkApi.
COM+ reference See also: GlinkConfiguration.setParameter(String) GlinkEvent_PRINT_STARTED static int GlinkEvent_PRINT_STARTED Notifies that print has started but not available yet. Print data is not available until a GlinkEvent_PRINT_DATA event is posted. PRINT_STARTED events will be posted only if the printer type configured is GlinkApi.. See also: GlinkEvent_PRINT_DATA GlinkEvent_SCREEN_AREA_MATCH static int GlinkEvent_SCREEN_AREA_MATCH The getValue method returns the GlinkScreenArea identity value.
COM+ reference Notifies that this side does not have the turn (permission) to send data and should instead expect to receive data from the other side (host). See also: GlinkApi.isTurnKnown() GlinkEvent_TURN_RECEIVED static int GlinkEvent_TURN_RECEIVED Notifies that this side have the turn (permission) to send data. See also: GlinkApi.isTurnKnown() GlinkEvent_VE_CONFIG_ERROR static int GlinkEvent_VE_CONFIG_ERROR Error type: An error with the configuration is detected.
COM+ reference GlinkEvent_VE_LOGON_FAILED static int GlinkEvent_VE_LOGON_FAILED Error type: User name or user password is missing or wrong. The error is reported only if Glink is not visible, otherwise the logon dialog box is displayed. See also: getValue(), GlinkApi.setVisible(boolean) GlinkEvent_VE_NO_API_LICENSE static int GlinkEvent_VE_NO_API_LICENSE Error type: License key allowing use of the API not found.
COM+ reference GlinkEvent_VE_TOOMANY_INSTANCES static int GlinkEvent_VE_TOOMANY_INSTANCES Error type: Too many simultaneous instances for Pro version.
COM+ reference Method Detail getEventCode int getEventCode() The application should check the Glink event code to determine which Glink event did occur, for example that the Glink session was connected or disconnected. getSource GlinkApi getSource() The method returns the GlinkApi object that generated the event. getValue int getValue() Some Glink events have a value set that gives more information about the given event.
COM+ reference GlinkField class Class GlinkField GlinkApi ªGlinkField class GlinkField A field is the fundamental element of a virtual screen. A field includes both data and attributes describing the field. The GlinkField class encapsulates a virtual screen field and provides methods for accessing and manipulating field attributes and data. GlinkField objects can be accessed only through the GlinkFields object.
COM+ reference int[ ] getAttributes() Returns an attribute array for the characters in the field. byte[ ] getDataBytes() Returns the screen characters (bytes) for the field in the character set used internally by Glink. GlinkPoint getEnd() Returns the ending position of the field. int getLength() Returns the length of the field. GlinkPoint getStart() Returns the starting position of the field. String getString() Returns the field text. boolean isHidden() Indicates whether or not the field is hidden.
COM+ reference Indicates whether or not the field is protected. void setString(String text) Sets the field text to the specified string.
COM+ reference Field Detail GlinkField_ATR_BLINK static int GlinkField_ATR_BLINK GlinkField_ATR_FIELD_ALPHABETIC static int GlinkField_ATR_FIELD_ALPHABETIC GlinkField_ATR_FIELD_ATTRIBUTE static int GlinkField_ATR_FIELD_ATTRIBUTE GlinkField_ATR_FIELD_DIGITAL static int GlinkField_ATR_FIELD_DIGITAL GlinkField_ATR_FIELD_MUST_ENTER static int GlinkField_ATR_FIELD_MUST_ENTER GlinkField_ATR_FIELD_MUST_FILL static int GlinkField_ATR_FIELD_MUST_FILL GlinkField_ATR_FIELD_NUMERIC static int GlinkField_ATR_FIEL
COM+ reference GlinkField_ATR_UNPROTECTED static int GlinkField_ATR_UNPROTECTED Gallagher & Robertson Glink: API reference manual 105
COM+ reference Method Detail getAttribute int getAttribute() Returns the attribute for the field. Returns: The raw field attribute.
COM+ reference Returns an attribute array for the characters in the field. For 3270 and 5250 the attribute byte itself preceding the field is not included. Use the getAttribute method to get that attribute. Returns: A integer array containing the attributes for the characters in the field See also: Attribute format. getDataBytes byte[ ] getDataBytes() Returns the screen characters (bytes) for the field in the character set used internally by Glink.
COM+ reference Returns the starting position of the field. The position can range from 1 to the size of the virtual screen. The starting position of a field is the position of the first character in the field. Returns: The starting position of the field. getString String getString() Returns the field text. This is similar to the getDataBytes() method, except the data is returned as a string instead of a byte array.
COM+ reference isNumeric boolean isNumeric() Indicates whether or not the field is numeric-only. Returns: True if the field is numeric only, otherwise false. isProtected boolean isProtected() Indicates whether or not the field is protected. Returns: True if the field is protected, otherwise false. setString void setString(String text) Sets the field text to the specified string. If the string is shorter than the length of the field, the rest of the field is cleared.
COM+ reference GlinkFields class Class GlinkFields GlinkApi ªGlinkFields class GlinkFields GlinkFields contains a collection of the fields in the virtual screen. It provides methods to iterate through the fields, find fields based on location, and find fields containing a given string. Each element of the collection is an instance of GlinkField. GlinkFields can be accessed through GlinkApi using the getFields() or getVariableFields methods.
COM+ reference Returns the number of GlinkField objects contained in the current form. int getFieldIndex(GlinkField glField) Returns the index of a GlinkField object within the collection. GlinkField item(int fieldIndex) Returns the GlinkField object at the given index. void refresh() Updates the collection of GlinkField objects.
COM+ reference Method Detail findByPosition GlinkField findByPosition(GlinkPoint targetPosition) Searches the collection for the target position and returns the GlinkField object containing that position. Parameters: targetPosition - The target row and column. Returns: If found, a GlinkField object containing the target position. If not found, returns a null.
COM+ reference Constant Value Description GlinkApi_SEARCH_FORWARD 0 Forward (beginning towards end) GlinkApi_SEARCH_BACKWARD 1 Backward (end towards beginning) caseSensitive - Indicates whether the search is to be case sensitive. True means the search will be case sensitive. Returns: If found, a GlinkField object containing the search string. If not found, returns a null. getCount int getCount() Returns the number of GlinkField objects contained in the current form.
COM+ reference fieldIndex - The index of the target field Returns: The GlinkField object at the given index position. See also: GlinkField refresh void refresh() Updates the collection of GlinkField objects. All GlinkField objects in the current virtual screen are added to the collection. Indexing of GlinkField objects will not be preserved across refreshes.
COM+ reference GlinkKey class Class GlinkKey GlinkApi ªGlinkKey class GlinkKey Glink command keys constants. This class contains the list of the available Glink command keys that can be supplied as a parameter to the SendCommandKey method. For other characters, use the sendKeys method. See also: GlinkApi.sendCommandKey(int), GlinkApi.
COM+ reference 3270 specific: Cursor select static int GlinkKey_DELETE Delete the character at the cursor position if the cursor is placed in an unprotected field static int GlinkKey_DOWN Cursor down static int GlinkKey_DUP 3270 specific: Set duplicate operation for the rest of the field and do a TAB key operation static int GlinkKey_END Move the cursor to the position following the last none space character in the variable field static int GlinkKey_ENTER Transmit to host if the keyboard option "Enter sends
COM+ reference Program function key 11 static int GlinkKey_F12 Program function key 12 static int GlinkKey_F2 Program function key 2 static int GlinkKey_F3 Program function key 3 static int GlinkKey_F4 Program function key 4 static int GlinkKey_F5 Program function key 5 static int GlinkKey_F6 Program function key 6 static int GlinkKey_F7 Program function key 7 static int GlinkKey_F8 Program function key 8 static int GlinkKey_F9 Program function key 9 static int GlinkKey_FIELD_EXIT 5250 specific: Exits and v
COM+ reference static int GlinkKey_FIELD_MARK 3270 specific: Set a field mark character to inform the application of the end of the field for an unformatted screen static int GlinkKey_FIELD_MINUS 5250 specific: Exits and validates the field as a negative value static int GlinkKey_FIELD_PLUS 5250 specific: Exits and validates the field as a positive value static int GlinkKey_HOME Go to first variable field static int GlinkKey_HOST_HELP 5250 specific: Request host help static int GlinkKey_INSERT Set the emula
COM+ reference 3270 specific: Program access key 3 static int GlinkKey_PA4 3270 specific: Program access key 4 static int GlinkKey_PGDN Page down, 5250 Roll up static int GlinkKey_PGUP Page up, 5250 Roll down static int GlinkKey_PRINT_SCREEN Print screen static int GlinkKey_RESET_KEYBOARD 3270 and 5250 specific: Reset keyboard static int GlinkKey_RIGHT Cursor right static int GlinkKey_SF1 Program function key shift/F1 or program function key 13 for 3270 static int GlinkKey_SF10 Program function key shift/F1
COM+ reference Program function key shift/F2 or program function key 14 for 3270 static int GlinkKey_SF3 Program function key shift/F3 or program function key 15 for 3270 static int GlinkKey_SF4 Program function key shift/F4 or program function key 16 for 3270 static int GlinkKey_SF5 Program function key shift/F5 or program function key 17 for 3270 static int GlinkKey_SF6 Program function key shift/F6 or program function key 18 for 3270 static int GlinkKey_SF7 Program function key shift/F7 or program functi
COM+ reference Transmit to host static int GlinkKey_UP Cursor up Constructor Summary GlinkKey() Method Summary static String toString(int key) static int toKey(String key) Gallagher & Robertson Glink: API reference manual 121
COM+ reference Field Detail GlinkKey_ALPHA_OVERIDE static int GlinkKey_ALPHA_OVERIDE 3270 specific: Enable alphanumeric characters for the current unprotected field GlinkKey_BACK_TAB static int GlinkKey_BACK_TAB Tab to previous variable field GlinkKey_BACKSPACE static int GlinkKey_BACKSPACE Delete the character at the previous position if the cursor is placed in an unprotected field GlinkKey_BREAK static int GlinkKey_BREAK Break/Attention GlinkKey_CLEAR static int GlinkKey_CLEAR Clear the screen and re
COM+ reference Delete the character at the cursor position if the cursor is placed in an unprotected field GlinkKey_DOWN static int GlinkKey_DOWN Cursor down GlinkKey_DUP static int GlinkKey_DUP 3270 specific: Set duplicate operation for the rest of the field and do a TAB key operation GlinkKey_END static int GlinkKey_END Move the cursor to the position following the last none space character in the variable field GlinkKey_ENTER static int GlinkKey_ENTER Transmit to host if the keyboard option "Enter se
COM+ reference Program function key 1 GlinkKey_F2 static int GlinkKey_F2 Program function key 2 GlinkKey_F3 static int GlinkKey_F3 Program function key 3 GlinkKey_F4 static int GlinkKey_F4 Program function key 4 GlinkKey_F5 static int GlinkKey_F5 Program function key 5 GlinkKey_F6 static int GlinkKey_F6 Program function key 6 GlinkKey_F7 static int GlinkKey_F7 Program function key 7 GlinkKey_F8 static int GlinkKey_F8 Program function key 8 124 Glink: API reference manual Gallagher & Robertson
COM+ reference GlinkKey_F9 static int GlinkKey_F9 Program function key 9 GlinkKey_F10 static int GlinkKey_F10 Program function key 10 GlinkKey_F11 static int GlinkKey_F11 Program function key 11 GlinkKey_F12 static int GlinkKey_F12 Program function key 12 GlinkKey_FIELD_EXIT static int GlinkKey_FIELD_EXIT 5250 specific: Exits and validates the field, erasing from current cursor position to the end of the field GlinkKey_FIELD_MARK static int GlinkKey_FIELD_MARK 3270 specific: Set a field mark character
COM+ reference GlinkKey_FIELD_PLUS static int GlinkKey_FIELD_PLUS 5250 specific: Exits and validates the field as a positive value GlinkKey_HOME static int GlinkKey_HOME Go to first variable field GlinkKey_HOST_HELP static int GlinkKey_HOST_HELP 5250 specific: Request host help GlinkKey_INSERT static int GlinkKey_INSERT Set the emulator into insert mode GlinkKey_LEFT static int GlinkKey_LEFT Cursor left GlinkKey_NEW_LINE static int GlinkKey_NEW_LINE New line GlinkKey_PA1 static int GlinkKey_PA1 3270
COM+ reference 3270 specific: Program access key 2 GlinkKey_PA3 static int GlinkKey_PA3 3270 specific: Program access key 3 GlinkKey_PA4 static int GlinkKey_PA4 3270 specific: Program access key 4 GlinkKey_PGDN static int GlinkKey_PGDN Page down, 5250 Roll up GlinkKey_PGUP static int GlinkKey_PGUP Page up, 5250 Roll down GlinkKey_PRINT_SCREEN static int GlinkKey_PRINT_SCREEN Print screen GlinkKey_RESET_KEYBOARD static int GlinkKey_RESET_KEYBOARD 3270 and 5250 specific: Reset keyboard GlinkKey_RIGHT s
COM+ reference GlinkKey_SF1 static int GlinkKey_SF1 Program function key shift/F1 or program function key 13 for 3270 GlinkKey_SF2 static int GlinkKey_SF2 Program function key shift/F2 or program function key 14 for 3270 GlinkKey_SF3 static int GlinkKey_SF3 Program function key shift/F3 or program function key 15 for 3270 GlinkKey_SF4 static int GlinkKey_SF4 Program function key shift/F4 or program function key 16 for 3270 GlinkKey_SF5 static int GlinkKey_SF5 Program function key shift/F5 or program fu
COM+ reference Program function key shift/F8 or program function key 20 for 3270 GlinkKey_SF9 static int GlinkKey_SF9 Program function key shift/F9 or program function key 21 for 3270 GlinkKey_SF10 static int GlinkKey_SF10 Program function key shift/F10 or program function key 22 for 3270 GlinkKey_SF11 static int GlinkKey_SF11 Program function key shift/F11 or program function key 23 for 3270 GlinkKey_SF12 static int GlinkKey_SF12 Program function key shift/F12 or program function key 24 for 3270 Glink
COM+ reference GlinkKey_TRANSMIT static int GlinkKey_TRANSMIT Transmit to host GlinkKey_UP static int GlinkKey_UP Cursor up 130 Glink: API reference manual Gallagher & Robertson
COM+ reference Constructor Detail GlinkKey GlinkKey() Method Detail toString static String toString(int key) toKey static int toKey(String key) Gallagher & Robertson Glink: API reference manual 131
COM+ reference GlinkScreenArea class Class GlinkScreenArea GlinkApi ªGlinkScreenArea class GlinkScreenArea Use GlinkScreenArea objects to facilitate screen/form identification. Often a given text string at a specific location is enough to identify the current screen. Use the GlinkApi.getScreenArea to get an object for a given screen area and use the GlinkApi.notifyScreenArea for later be notified when the current screen matches this object. You may also use the GlinkApi.
COM+ reference String getString() Returns the text string for the given screen area. boolean isRectangle() Returns true if the object is for a rectangle area.
COM+ reference Constructor Detail GlinkScreenArea GlinkScreenArea(GlinkPoint start, GlinkPoint end, boolean rectangle, String string) Method Detail getEnd GlinkPoint getEnd() Returns the end posistion for screen area. getStart GlinkPoint getStart() Returns the start posistion for the screen area. getString String getString() Returns the text string for the given screen area.
COM+ reference GlinkEventListener interface Interface GlinkEventListener interface GlinkEventListener Implement this interface to allow the class to be registered as a GlinkEventListener. Method Summary void onGlinkEvent(GlinkEvent event) This method will be called when a Glink event is generated. Method Detail onGlinkEvent void onGlinkEvent(GlinkEvent event) This method will be called when a Glink event is generated.
OLE reference Glink.Auto OLE Automation Overview OLE (Object Linking and Embedding) allows you to manipulate objects from other applications using the Component Object Model (COM). COM defines how objects interact between applications.
OLE reference OLE CALR %v OleID.Method [params] OLE FREE OleID The OLE CREATE command allows you to create an instance of an OLE Automation object. To access a copy of Word for example you would use the name "Word.Basic". OLE CONNECT is similar but lets you connect to an object that already exists. To obtain the value of a property supported by the server you can use the OLE GET command. To set the value of a property you would use the OLE SET command.
OLE reference Note that the copy of Word we start to do the conversion will not be visible (unless we ask it to be). Automation Server In the same way that Glink can operate as either a DDE server or a DDE client, it will also operate as an Automation server or an Automation controller. The class has been called "Glink.Auto" and is registered automatically when you start Glink. Once that's been done you can immediately start using Glink from other applications that support OLE Automation.
OLE reference and the list appears. Once you have selected "Glink", type a dot and a list of interfaces will be displayed: Dim Gl as Glink. Select "Auto". Dim Gl as Glink.Auto If you want the Glink.Auto object created automatically as soon as it's used, then use: Dim Gl as new Glink.Auto If you are going to use the Glink's Automation events, then you must use the WithEvents keyword.
OLE reference End Sub Glink.Auto, a single instance interface As Glink is not a Multi-Document Interface (MDI) in the same way as applications which open spread-sheets, documents, the Glink.Auto object is a single-instance interface. This means that only one Automation client can connect to it at a given time. When you create a Glink.Auto object, the system will connect you to the first available copy of Glink.
OLE reference Enumerating Glink sessions with VB As you only get a connection to the next Glink session once the previous one is connected, you need to continue connecting to the next Glink.Auto without freeing any of the copies you have connected to already. This can be done in several ways -- below is a generic recursive method which connects to a specific Glink session using Glink Title+"!"+Glink instance number as an identification for a specific Glink. In Visual Basic this is: gl.Caption + "!" + gl.
OLE reference Dim gl As Glink.Auto Private Function NextGlink(Name As String, Display As Boolean) As Glink.Auto Dim Dim Dim Dim gl As Glink.Auto glnext As Glink.Auto S As String A As Boolean Set NextGlink = Nothing Set gl = GetObject("", "Glink.Auto") If Not gl Is Nothing Then A = gl.Automated S = gl.Caption + "!" + Str(gl.Instance) gl.ShowText (S) If Display And (A = False) Then List1.
OLE reference ' New Glink Private Sub Command1_Click() StartNewGlink End Sub Private Sub Command2_Click() Dim Name As String Name = List1.Text If Name = "" Then MsgBox ("You must select a Glink from the list first") Else ConnectToRunningGlink (Name) End If End Sub ' Refresh list Private Sub Command3_Click() List1.
OLE reference Glink.Auto programmers reference Events The following events are available: Event Description OnConnect Connection event OnDisconnect Disconnection event OnTurn Turn or new screen received OnData Communications data received OnPattern User defined pattern received Glink's Automation events allow you to supply callback functions which will be called by Glink when the specified event occurs. The OnConnect Event OnConnect() This event occurs when Glink successfully connects.
OLE reference The OnDisconnect Event OnDisconnect() This event is generated if the communication link goes down or gets disconnected either by the host or by the user. VBA Example: Private Sub Gl_OnDisconnect() List1.AddItem ("OnDisconnect received") End Sub The OnTurn Event OnTurn() This event signals that the host has finished sending data and is waiting for user input. It will normally indicate that the host has sent a new screen and that all the data has been processed by Glink.
OLE reference The OnData event is triggered when the host starts sending new data. VBA Example: Private Sub Gl_OnData() List1.AddItem ("OnData received") End Sub The OnPattern Event OnPattern ( PatternId ) PatternId: Integer Id value supplied on Pattern method This event occurs when a user defined pattern occurs. Patterns are set by suing the Gl.Pattern method. VBA Example: Private Sub Gl_OnPattern(ByVal PatternId As Long) If PatternId = 1 Then Gl.Pattern(1, "") Text1.
OLE reference Properties The following properties are provided by Glink: Property Description Automated Provides Glink automation status Caption Current window title CursorX Current screen X coordinate CursorY Current screen Y coordinate DDEname Current DDEname Gparam Global script parameters Height Height of main window (pixels) Iconic Iconic state Info interface Emulation information interface Instance Glink instance identifier Left X-coordinate of main window (pixels) Param Scri
OLE reference The Automated property Automated: Boolean Automation status This property can be used to find out whether or not the copy of Glink to which you are connected is one that was started as a result of your CreateObject or that was already running at the time. Note that if you disconnect from Glink and leave the Glink window visible then that copy will remain in memory and be available for future sessions; the automated property will then change from true to false.
OLE reference This property can be used to read or set Glink's DDE name, See the DDENAME script command for more details The Gparam property Gparam: String Global script parameter This property can be used to get or set the global script parameters $GPARAM. Gparam is provided in the same way as it is for DDE, to allow you to interact with a script that might be running. VBA Example: GL.GParam = "0" GL.ScriptCommand ("Idle 10;Gparam 1") While GL.
OLE reference This property returns an integer which uniquely identifies the current copy of Glink. This may be used to check that you are connected to the session you intended. The Left property Left: Integer Left window co-ordinate This property can be used to get or set the left co-ordinate of the top-left corner of the main Glink window. This value is in pixels. VBA Example: Dim GL As Object Set GL = CreateObject ("Glink.Auto") GL.Visible = True GL.
OLE reference VBA Example: Dim GL As Object Dim Cont As Boolean Dim S As String Set GL = CreateObject("Glink.Auto") GL.LoadConfig ("UNIX.glinkconfig") GL.Connect("") Cont = True Do S = GL.Receive(100, String(1, Chr(13)), 100, True) If S > "" Then If InStrB(S, "ogin:") > 0 Then GL.Transmit ("name") End If If InStrB(S, "ssword") > 0 Then GL.Transmit ("pass") Cont = False End If End If Loop Until Cont = False GL.
OLE reference The Visible property Visible: Boolean Visible state This property can be used to get or set the visible state of the Glink window. When started as an automation server, this value will be FALSE which means that the Glink window will be hidden. You can change this by setting the Visible property to TRUE. If the Glink Visible property is still TRUE when you finish using the Glink.Auto object, Glink will be left on the screen rather than terminated.
OLE reference Methods The following methods are provided by Glink: Method Description Connect Connects the communications line Disconnect Disconnects the communications line Emulate Emulates a string locally GWConnect Makes a connection through a gateway LoadConfig Changes to another configuration Pattern Enables OnPattern event Quit Stops the emulator Receive Waits for a defined string from the host ScriptCommand Executes a script command ScriptFile Executes a script file Send Sends
OLE reference Dim GL As Object Set GL = CreateObject ("Glink.Auto") GL.LoadConfig ("WSK.glinkconfig") GL.ProcessLine = True GL.GWConnect ("ggate", "phoenix") GL.GParam = "0" GL.ScriptCommand ("Rece '-^$03';Sndl 'Gkrm F';GetF FTRA '*CLP;msg';GPar '1'") While GL.GParam = "0" DoEvents Wend Selection.Paste The routine shown is the basis for a Word 7 macro, and as such is written in VBA. It starts off by defining the Glink object. The first statement creates an instance of Glink.
OLE reference The Connect method Connects the communications line Connect ( Hostname ) Hostname: String host name to connect to Return value: none This method connects the communications line. If the configured communications interface supports a host name, such as TCP/IP connections, then the Hostname parameter will be use. If an empty string is provided, then the default config values will be used.
OLE reference VBA Example: Dim S As String S = GL.Receive(100, String(1, Chr(03)), 100, FALSE) If (S > "") Then Emulate (S) If InStrB(S, "MODEL") > 0 Then GL.Transmit ("VIP7804") Else If InStrB(S, "LOGON") > 0 Then GL.
OLE reference The Pattern method Enables the OnPattern event Pattern ( PatternId, Pattern ) PatternId: Long Pattern: String PatternId supplied with OnPattern event Pattern to receive from the host Return value: Boolean TRUE if successful, otherwise FALSE This method enables the OnPattern event. The PatternId is passed as a parameter to the OnPattern event callback function. Up to twenty different 'patterns' may be set using this command using the PatternId, numbered from 1 to 20.
OLE reference The Receive method Waits for one of the defined characters from the host Receive ( Maxlen, Waitchars, Timeout, Process ) Maxlen: Integer Waitchars: String Timeout: Integer Process: Boolean Max number of host data to receive Characters to wait for Max millisecond to wait receive Process host data received Return value: String Received data from the host This method returns the string of characters received from the host.
OLE reference This method executes a script command. The call returns immediately, so the script command may not have terminated when it returns. VBA Example: GL.ScriptCommand ("Set Mrect ON; Mark 8 5 72 22;Perform Copy") The ScriptFile method Executes a script command ScriptFile ( Scriptfilepath ) Scriptfilepath: String Script file to execute Return value: none This method executes a script file. The call returns immediately, so the script file may not have terminated when it returns.
OLE reference VBA Example: Dim S As String S = GL.Receive(100, String(1, Chr(03)), 1000, True) If InStrB(S, "MODEL") > 0 Then GL.Send ("VIP7804") GL.Transmit ("") End If The SendBreak method Sends a break to the host SendBreak ( ) Return value: none This method sends a communications break to the host. The Show method Sends a message to the emulator Show ( Text ) Text: String Text to send Return value: none This method sends a message to the emulator as if it was typed in at the keyboard.
OLE reference VBA Example: GL.ShowText("Hello world!") The Transmit method Sends data to the host with a terminator Transmit ( Data ) Data: String Data to send to the host Return value: none This method sends a sting of data to the host without local emulation but with a terminator. The terminator will depend on the emulation state and the communications interface. Generally in FORMS or BLOCK modes, the terminator will be ETX, otherwise it will be CR. VBA Example: Dim S As String S = GL.
OLE reference The Info Interface The following Glink.
OLE reference All the properties are Booleans except for the following String properties. The EmulMode property may have the following values: 7 = VIP7700 8 = VIP7800 A = Ansi 3.
OLE reference The TCPprotocol is only relevant if the CommName is Windows sockets (WINS) and may be one of the following: T = Telnet S = SNI/OSI link N = NCR/OSI link 6 = DNTD gateway W = Raw TCP/IP S = G&R DIWS gateway D = G&R DSA gateway R = Rlogin V = TNVIP 3 = TN3270 5 = TN5250 Gallagher & Robertson Glink: API reference manual 165
OLE reference The Screen Interface The following Glink.Screen properties are available: Property Description Col Current cursor column position Cols Max columns (read-only) Field() interface Interface to field FormsMode Forms mode (read-only) FieldCount Number of fields in form (read-only) Row Current cursor row position Rows Max rows (read-only) ScreenText Screen text Status interface Interface to status line The following Glink.
OLE reference The SendKey method Sends a string to the emulator as if it came from the keyboard SendKeys ( Keys ) Keys: String Keys to send Return value: none The string will also be interpreted if the following ^control-character syntax are present: ^^ ^X ^#ddd ^&ooo ^$hh inserts a single ^ control character (bottom five bits of the specified character only) decimal specification octal specification hexadecimal specification Using the different possibilities here means that the ASCII CR and ESCAPE c
OLE reference Text will only be written to the screen if it is valid text for that position of the screen. For none valid characters in the string such as none numeric in a numeric field or writing on a protected position, the character for that position will be ignored and will continue to the next position on the screen for the next character in the string.
OLE reference The Field Interface The following Glink.Screen.
OLE reference Variable Variable All these properties are read-only apart from the FieldText string property. The attribute properties are booleans, the other field properties are longs. The Field(i).FieldText property FieldText: String Field text writes a string to an unprotected field or reads a string from any field. Text will only be written to unprotected fields.
OLE reference The Status Interface The following Glink.Screen.Status properties are available: Property Description StatusText Status line text (read-only) This string property is read-only.
DDE reference DDE reference Overview The Glink DDE interface will transfer data to other applications using the standard Windows text format, OEM format or using the extensions to the Windows character set used internally by Glink. (The Glink character set may be inspected using ALT+F9 when running Glink - it is a superset of the standard set). To use this last character set you must obtain a clipboard format identifier by using the RegisterClipboardFormat() call with the name 'GlinkFont'.
DDE reference DDE Initiate The DDE conversation is initiated in the standard form, using application and topic names. The application name is of course 'GL', while the default topic name is 'GLINK'. The topic name will in general be set to the main window title, which in turn consists of the fixed window title (GLINK) optionally followed by the current host name (a hyphen will separate these). The fixed window title may be changed for a specific instance of Glink using the script TITLE command.
DDE reference Requestable items Requestable items may be used for cold links, warm links and hot links with the exception of LinGet which may only be used for warm and/or hot links. The following item specifications are supported: AtrGet X Y DX DY Collects attributes from a rectangle on the emulation screen. If the length DX is not specified then attributes for the rest of the line will be returned. If the number of rows DY is not specified then attributes for one line will be delivered.
DDE reference GetFldN field_no Returns the field definition for the specified field (VIP7700 and VIP7800 modes only). A single parameter specifying the field number is needed; you may use a value of zero to specify the field currently containing the cursor. The data returned is in the same format as for GetFldX (see below). GetFldX X Y Returns the field definition for the field containing the screen location defined by X and Y (VIP7700 and VIP7800 modes only).
DDE reference The following attribute bits are defined: 0x00000001 0x00000002 0x00000004 0x00000008 0x00000010 0x00000020 0x00000040 0x00000080 0x00000200 0x00000400 0x00000800 0x00001000 0x00002000 0x00004000 0x00010000 0x00020000 0x00040000 0x00080000 0x00100000 0x00200000 GetInfo Blue Green Red Low intensity Blink Hidden Inverse Underline Double height Double width Omit print Modified Transmittable Unprotected Must Enter Must Fill Justify Right Alphabetic Numeric Digit Returns information about the cur
DDE reference submode fields columns rows x y bits speed interface M=flags field info 178 T = Minitel (Teletel) V = VT102/VT220 C = character mode E = echo mode F = forms mode T = text mode X = TX-RET mode number of fields in current form (forms mode only) current screen width current screen length current cursor column current cursor row 7 or 8 depending on whether the connection is 7 or 8-bit current connection speed (where relevant) communications interface (same mnemonics as in script CTYPE command
DDE reference A typical string returned from GetInfo could look like this: 8,F,12,80,24,34,8,7,9600,WIND, M=STWY,3,32,8,6,00016000,1 This would tell you that Glink was in VIP7800 forms mode, showing a 12-field form on a normal 80x24 screen. The cursor is in column 34 in row 8. The connection is a 7-bit connection at 9600 bps using the Windows serial interface. Space suppression, auto tabbing, auto wrapping and typeahead are in effect.
DDE reference Unlike a normal link, this one does not deliver advisements when the data has changed but simply whenever there is any data to deliver. We recommend that for secure delivery of data, you define a warm link to the LinDat item rather than the LinGet item, and issue requests on LinGet when the advisement for LinDat is received. LinProc max_length Same as LinGet, except that when the data is collected it will also be processed by the emulator (i.e. displayed on the emulator screen).
DDE reference SysItems This simply provides a list of items that are requestable. The list is separated with tab characters in the normal way. SysPokes This provides a list of items that are 'pokable', see below. UvtiGet Returns the current value of the UVTI status item. This item may be set either using the script SET UVTI command or using the UvtiPut DDE poke. This is provided specifically for the return of status codes from an executing script.
DDE reference VduGet may also be set up automatically using the 'Paste Link' menu item in those applications that support the Paste Link. In this case, to establish a link between a field in the client application you simply mark the area of the screen to be linked, making sure that the 'mark rectangles' option in the Edit menu is checked, select Edit/Copy in the Glink window, and then use the Paste Link command in the client application.
DDE reference VidGet X Y DX DY Collects video attributes from a rectangle on the emulation screen (video attributes relate only to the actual appearance of the field on the screen, as opposed to field-oriented attributes). If the length DX is not specified then attributes for the rest of the line will be returned. If the number of rows DY is not specified then attributes for one line will be delivered. If the position is not specified then the current cursor position will be used.
DDE reference Attributes are returned in binary format with 16 bits per character position. The significance of the attribute bits is as for the returned attributes in the VidGet request. XfrSts This request returns the current file transfer status and is typically used in the same way as LinSts. Applications may link to the XfrSts item before starting a transfer (this should provide a status of 'transfer pending' until the transfer is actually initiated).
DDE reference The additional error codes are only sent in the case when the state is 1. These error codes consist of two values, a major code and a minor code. The actual values of the major and minor code are contained in the UVTI.H file; for a full list consult that file.
DDE reference Pokable items The following POKE commands are accepted by the Glink DDE: KeyPut Feeds keystrokes to the emulator as though they were entered from the keyboard. This command may not be used to enter data into dialog boxes, only into the main emulator window. The format is also in the 'old' style where you may enter ASCII codes and/or scan codes. Each keystroke must be separated by a space, comma or semicolon.
DDE reference LinPut The data accompanying this command will be sent directly to the communications interface irrespective of the current mode of the emulator. The data will not be 'terminated' (with CR, ETX or EOT) unless the relevant character is specified as part of the data. In that the termination character is affected by the emulator state, communications interface, and Glink configuration we recommend that you use the LinXmt command rather than the LinPut command when termination is required.
DDE reference VduEmu This is exactly the same as VduPut, with the exception that whereas VduPut treats the data as though it had been typed, VduEmu treats the data as though it had been received over the line interface. VduPut The data accompanying the command is processed according to the current emulator state. For example if Glink is currently in ECHO mode, the data will be sent to the communications interface only, while if Glink is in FORMS mode then the data will only be presented on the screen.
DDE reference Visual Basic Examples The online help in Glink/Windows contains an example that you may use to help get you started with your own programs. Here we will include another example that may give you some ideas as to how you can use the DDE verbs. Many thanks to Ken Shepherd for giving us permission to use this code. ' ' ' ' ' ' This VisualBasic program uses DDE to capture system information from the GCOS8 TSS VIDY system monitor.
DDE reference FontSize FontStrikethru FontUnderline Height Left MultiLine ScrollBars TabIndex Top Width = = = = = = = = = = 9 0 'False 0 'False 735 240 -1 'True 3 'Both 6 2640 7095 End Begin TextBox moretext Alignment = 2 'Center Height = 375 Left = 1560 TabIndex = 5 Top = 600 Width = 615 End Begin CommandButton sendbutton Caption = "Send" Height = 495 Left = 6120 TabIndex = 4 Top = 600 Width = 1215 End Begin TextBox recvstuff Height = 1215 Left = 240 MultiLine = -1 'True ScrollBars = 3 'Both TabIndex =
DDE reference Begin Label Label4 Alignment Caption Height Left TabIndex Top Width End Begin Label Label3 Alignment Caption Height Left TabIndex Top Width End Begin Label Label2 Alignment Caption Height Left TabIndex Top Width End Begin Label Label1 Alignment Caption Height Left TabIndex Top Width End Begin Label gcp BorderStyle Height Left TabIndex Top Width End Begin Label gmemk BorderStyle Height Left TabIndex Top Width End Begin Label icp BorderStyle Height Left TabIndex Top Width End Begin Label imemk B
DDE reference End Begin Label sproc BorderStyle = 1 'Fixed Single Height = 495 Left = 1440 TabIndex = 9 Top = 4680 Width = 1215 End Begin Label smemk BorderStyle = 1 'Fixed Single Height = 495 Left = 1440 TabIndex = 8 Top = 4080 Width = 1215 End Begin Label sname BorderStyle = 1 'Fixed Single Height = 495 Left = 1440 TabIndex = 7 Top = 3480 Width = 1215 End Begin Menu mnuFile Caption = "File" Begin Menu mnurunscr Caption = "Run script...
DDE reference r1: vidyline$ = "" vidylnum% = 0 jobmore% = 0 recvstuff.LinkTopic = "GL|GLINK" recvstuff.LinkItem = "LinProc 5000" ' Allow up to 5000 characters recvstuff.LinkMode = NONE ' from the host per event. recvstuff.LinkMode = HOT recvstuff.LinkRequest Exit Sub startit: If Err = DDE_NO_APP Then t% = Shell("\gl50e\gl.
DDE reference worktext.LinkItem = "Script" worktext.Text = cmdialog1.Filename worktext.LinkMode = 1 worktext.LinkPoke End Sub Sub recvstuff_Change () ' This subroutine is called each time new data arrives from the ' host. The textbox recvstuff is hot-linked to Glink via LinProc. Static okdone% If okdone% = -1 Then MsgBox "oops!" + recvstuff.Text Exit Sub End If okdone% = -1 ' do not allow reentry while looking at dde xcn$ = viewhost.Text recvlen% = Len(recvstuff.Text) For i% = 1 To Len(recvstuff.
DDE reference sendstuff.
HLLAPI reference HLLAPI reference This section does not attempt to describe the actual HLLAPI interface; for that information refer to the official HLLAPI documentation supplied by IBM. Files relating to HLLAPI The following files are delivered with Glink for Windows to provide HLLAPI support. File name Description HLLAPI32.DLL The Dynamic Link Library that precompiled HLLAPI applications will use at run time.
HLLAPI reference File name Description HLLAPI.BAS This is the definition file to be included into Visual Basic projects. The file is only needed by developers coding in VB directly to the HLLAPI specifications. This file contains a few utility functions to simplify programming. WHLLAPI.PAS Provides the same capabilities for those programmers using Borland Pascal 7.0, Turbo Pascal for Windows or Delphi. Just compile the Pascal source with the compiler you are using.. HLLDB32.
HLLAPI reference [Configuration] GlinkDir=c:\glwin GlinkParameters=/R72 [Hllapi32] DebugFile='HLLAPI32.DB' Debugging=OFF DebugAppend=OFF HllapiDll=hllapi32.dll PureDDE=FALSE DisableHide=FALSE [Default] ;[shortname] ;Name=glinktitle ;Config=filename ;ConnectCommand=command ;ConnectScript=name ;DisconnectCommand=command ;DisconnectScript=name ;Transfer=transfer_type [A] Name=ibmhost.ip.adr Config=ib1.glinkconfig [A] Name=ibmhost.ip2.adr Config=ib2.glinkconfig;GCOS7 Microfit/Ftran ;[transfername] ;e.g.
HLLAPI reference GlinkParameters=parameters This specifies any command line options you wish to be used when Glink for Windows is started. The [Hllapi32] section This specify debugging information needed for the HLLAPI DLL. DebugFile=filename This specifies the name of the file to which debugging output will be sent if debugging is enabled (see the next option). If debugging is enabled without a DebugFile directive then output will be sent to HLLAPI.DB in the current directory.
HLLAPI reference DisableHide=TRUE When set to TRUE, this tells the HLLAPI functions never to hide the Glink window. This can be useful when setting up and testing a HLLAPI application so as to be able to visually follow the execution of the host dialog. The [shortname] sections The HLLAPI ‘shortname’ is a letter from A-Z. The first site must be [A], the second [B] and so on.
HLLAPI reference Directive Description Transfer Specifies the file transfer type for this connection. Valid values for this are: GKRMGCOS8 Gkrm FTRAN8 GCOS8 Ftran FTRAN GCOS7 Ftran KERMIT GCOS6 Kermit GKERM GCOS6 G&R Gkerm INDMVS IBM MVS/TSO IND$FILE INDCICS IBM CICS/VS IND$FILE INDVM IBM VM/CMS IND$FILE transfername GLHLLAPI.INI-defined transfer type; see the [transfername] section below for details.
HLLAPI reference Directive Description Server Specifies the script commands to start Glink in Server mode SendText Specifies the script commands to execute to initiate a text file transfer to the host. SendBinary Specifies the script commands to execute to initiate a binary file transfer to the host. ReceiveText Specifies the script commands to execute to initiate a text file transfer from the host.
UVTI reference UVTI reference This section does not attempt to describe the actual UVTI interface; for that information refer to the official UVTI documentation supplied by Bull and the on-line help file supplied with Glink. Files relating to UVTI The following files are delivered with Glink for Windows to provide UVTI support. File name Description UVTI32.DLL The Dynamic Link Library that precompiled UVTI applications will use at run time. Affinity Visual will also use this file.
UVTI reference 206 File name Description GLUVTI32.LIB An alternate library file that may be used if you are developing C applications for Glink/UVTI that must be able to coexist with Affinity/UVTI applications. To do this you will need to rename the UVTI32.DLL supplied with Glink to GLUVTI32.DLL (leaving the Affinity UVTI32.DLL) in place) and link your applications with GLUVTI32.LIB instead of UVTI32.LIB. The file will normally reside in your C library directory. GLUVTI.
UVTI reference UVTI installation Which files you will need to install will depend on whether you are going to use both Glink and the Affinity emulator on your system, and also whether you are going to be programming your own applications directly to the UVTI specifications (as opposed to using pre-packaged products such as Affinity Visual).
UVTI reference [Connections] ;sitename=config LanHost=lan.glinkconfig LanHostS=lan.glinkconfig Modem=asy.glinkconfig ModemDial=asy.glinkconfig Dps6DNTD=dnt.glinkconfig [Default] ;[sitename] ;Config=filename ;ConnectCommand=command ;ConnectScript=name ;DisconnectCommand=command ;DisconnectScript=name ;Transfer=transfer_type ;LineStatus=CHECK ;PF_pres=presentation_type ;LK_comm=comms_type ;WaitETX=false ;ReturnETX=false ;RawData=false ;RecWait=0 ;GlinkVer=540 [LanHost] ConnectCommand=NETCONNECT 192.150.211.
UVTI reference The [Configuration] section This specifies general information needed to start up the initial copy of Glink for Windows. GlinkDir=directoryname This specifies the directory on which the GL.EXE program resides. It is not needed if this directory is included in your PATH. GlinkParameters=parameters This specifies any command line options you wish to be used when Glink for Windows is started.
UVTI reference PureDDE=TRUE When set to TRUE, this tells the UVTI modules to use only DDE when communicating with Glink. Normally the most common functions will communicate directly with Glink using Windows messages but in some circumstances (for example when using Network DDE) it may be desirable to force the use of DDE for all operations. DisableHide=TRUE When set to TRUE, this tells the UVTI functions never to hide the Glink window.
UVTI reference Directive Description ConnectScript The script file to run when the initial connection to the host is made. If specified then it will override any ConnectCommand directive that might have been specified. DisconnectCommand Specifies a script command that will be executed at disconnect time. DisconnectScript Specifies a script to run at disconnect time. If present this directive overrides any DisconnectCommand directive that might have been specified.
UVTI reference Directive Description WaitETX Specifies that the UVTI interface defer delivery until receipt of ETX rather than ETB (default is FALSE). Valid only for synchronous types of interface (LK_VIP, LK_TGX25, etc). ReturnETX Specifies that received ETX characters should be delivered to the application (the default FALSE will strip these). Valid only for synchronous types of interface (LK_VIP, LK_TGX25, etc). RawData Specifies that all received characters be delivered to the application.
UVTI reference UVTI will first look in this file for the file transfer script commands before using the ones from the UVTI DLL. The special characters %p and %h will be replaced by the PC filename and the Host filename respectively as supplied by the UVTI application. The parameters in each section are: Directive Description Dialog Specifies the script commands to start the Glink File Transfer menu.
UVTI reference Debugging UVTI applications The UVTIDB32.DLL file can help in debugging UVTI applications. To use this utility, rename the UVTI32.DLL file in your Windows directory to GLUVTI32.DLL. Copy the UVTIDB32.DLL file to UVTI32.DLL in the Windows directory. This DLL will intercept calls to the UVTI and, if debugging is enabled with 'Debugging=On' in the [Configuration] section of the GLUVTI.