Its main feature is its support of the Windows Applications Programming Interface (API) for Windows Graphical User Interface(GUI), DDE and ODBC support.
The current KCML version 4.0 and above has a statement called $DECLARE that allows KCML programs to call functions in the Windows API or functions in 3rd party Windows DLL's. In order for this to be achieved in a UNIX/RISC environment, Windows DW Terminal Emulator is used to actually perform the call and pass the results back to the KCML program.
Because the Windows API is so vast (a collection of over 600 calls), and because not all of the functions are useful from a KCML program, a list of useful API calls is supplied in the $DECLARE help file.
As well as accessing functions in the Windows API or in 3rd party DLL's, some special functions built into WDW.EXE can also be called. These functions generally fall into 3 groups:
These functions have been provided to allow a KCML program full access to some of the more advanced features of the Windows API.
Also included are many examples of using these functions that can be pasted into a KCML session and used almost immediately.
DDE Microsoft Windows includes a system that allows Windows applications to communicate with each other in order to transfer data. This system is known as Dynamic Data Exchange or DDE for short. Applications that request data from others are known as DDE 'clients', whereas applications that can supply data on request are known as DDE 'servers'. Most major applications support DDE in both directions, typical examples of which are Microsoft's Word for Windows, Access and Excel, and Lotus's 123 for Windows and Ami Pro.
Even the Windows Program Manager is DDE compliant, allowing other DDE applications to request information about program groups and items - even allowing other applications to create new program groups and items.
Because coding applications to use DDE are not straightforward, a number of functions exist as part of WDW that can simplify matters. These functions can be accessed from KCML using the $DECLARE statement, and allow you to send or receive data using DDE with just a few lines of code. For example, a KCML program could start a DDE conversation with Excel, and instruct it to perform a particular task - such as drawing a graph for example. Likewise, a macro written in Excel could request data from KCML, demonstrating the transfer of data in two directions.
WDW supports the ability for KCML programs to act as full DDE server applications, allowing other Windows apps to connect to them and exchange data. To enable a KCML program to act a DDE server the program needs to make calls to various functions in the DDEML.DLL library, and also make use of 3 new embedded KCML type calls. All of these calls are made via the $DECLARE protocol.
The system works in a similar way to the new Dialog box protocol, where a KCML program waits on a KEYIN statement, and is "forced" out of this by WDW. The KCML program can then make special calls to determine the type of DDE call that has been made by a client application, process it and then return or extract any necessary data.
DDE involves a client and a server application. A client application will attempt to "connect" to a server that has a unique name. Each server can register a number of supported "topics" with the DDEML library, and when a client attempts to connect, it will specify the name of the server and a topic name. If no matching server is found, or if the named server hasn't registered support for the specified topic name, then the DDEML manager will refuse the connection. For example, if a client wishes to connect to Microsoft Excel 5.0, it will specify "Excel" as the server name, and a workbook file as the topic (i.e. "Book1"). Assuming the Excel is running, and "Book1" is open, the connection will be granted.
Once a connection has been made, the DDE client can exchange data in one of 3 different ways - a Request, a Poke or an Execute command. Dialog Boxes Special functions can be called allowing you to create and display Windows dialog boxes from your KCML program. These dialog boxes can have Windows controls added to them, such as push buttons, list boxes, edit controls, etc. There are also two special control types that allow you to display images and images on buttons. For more information on creating controls, see the Controls section.
Creating and manipulating dialog boxes is achieved using the following $DECLARE functions:
KCMLStartDialog
KCMLCreateDialog
KCMLShowDialog
KCMLHideDialog
KCMLEndDialog
Miscellaneous
Some extra functions are included with WDW that allow you to manipulate data in the Windows Clipboard, and also a simple image viewer that will allow you to display bitmap files (.BMP's) in a separate window.
KCMLWriteClipboard
KCMLReadClipboard
KCMLGetClipboardLength
KCMLDisplayImage
In order to run WDW, you must have the following:
For more information visit the Kerridge
Computer Home Page!
Email:
Copyright © MidWare Technologies, Inc. - All Rights Reserved.
Visitors =
Updated 04/04/2001