In this section: Creating a Visual Basic Program How to: |
The API requires that application programs contain specific data structures and employ specific numeric constants in certain method calls. All API method calls are implemented in Microsoft and expect their parameters to be passed to them using standard call-by-reference (pointers to variables) conventions.
EDAAPI.DLL is a fully WIN32 compliant 32-bit DLL that operates in Windows 9x, Windows ME, Windows NT®, Windows® 2000, Windows XP, and Windows 2003.
Working samples are provided in various languages. The first step in writing an API application should be to confirm that the desired sample language properly compiles, links, and runs to ensure there is a properly working environment.
The C, C++, and VB samples have been tested with Visual Studio 6 and Visual Studio .NET 2003, however, the step by step instructions are for Visual Studio 6. The Visual Studio .NET 2003 instructions are similar.
When you compile an API application written in Microsoft Visual C/C++® language, you should include the EDA.H header file in those sources referencing API method calls. EDA.H contains symbolic constants and method prototypes. EDASYS.H, which contains Windows-specific declarations, is included by EDA.H.
See your compiler's manual for further information on calling C/C++ subroutines and passing parameters by reference.
To create an application using the API, compile the application in the usual manner and include the stub library, EDAAPI.LIB, in your link command. Linking your application with this stub library will insert the appropriate reference to the API DLL, EDAAPI.DLL. When you execute your application, the API requires that EDAAPI.DLL be available to load from the DLL search path. As the API operates, it will look for other DLLs for communications and other purposes.
The installation media installs sample client applications (edaapp.c and edaapp.cpp) located in, depending if the client or server software is installed:
drive:\ibi\client71\home\etc
or
drive:\ibi\srv71\home\etc
The sample application is very similar to the DOS rdaapp program that is used to verify a server as operational, to test the connection to your server, and to run simple commands. If this step is successful, a customer-written application can then be built and tested.
drive:\ibi\client71\home\bin
drive:\ibi\srv71\home\bin
drive:\ibi\client71\home\bin
drive:\ibi\srv71\home\bin
drive:\ibi\client71\home\bin
drive:\ibi\srv71\home\bin
When you are writing an API application in Microsoft Visual Basic, you must include the edaglob.bas header file, which contains symbolic constants and method prototypes.
The system user environment variables must also be set to establish the path location of all required modules. For example, when you execute your application, the API requires that EDAAPI.DLL be available to the DLL search path.
The installation process installs a zip file (edaappvb.zip) containing a sample client application and associated files (edaapp.bas, edaapp.frm, and edaapp.vbp) located in one of the following directories:
drive:\ibi\client71\home\etc
drive:\ibi\srv71\home\etc
The sample application is similar to the Test Tool program that is used to verify a server as operational, to test the connection to your server, and to run simple commands. If this step is successful, a customer-written application may now be built and tested.
drive:\ibi\client71\home\etc
drive:\ibi\srv71\home\etc
Note: This sample application was originally designed with a pre-VB6 release under a prior name (EDAFUNC). For the 5.3 release, the name was changed to be consistent with the other API samples and some unused references were cleaned up. It is otherwise the same and verified for use with VB6 and Visual Studio .NET 2003. VB7 does not use the same type of project file, and there are syntax differences, but VB7 has an import feature which was successfully used to build and run the VB6 edaapp sample. There are no plans at this time to created a pure VB7 sample, the import feature should be used.
Gencpgm.bat is a DOS batch file for the compilation of C, C++, and Visual Basic (VB6) using Visual Studio 6 and C and C++ using Visual Studio .NET 2003 programs from a DOS command line. This batch file provides a simple compilation method for simple compilation cases. It does not support the full capabilities that a Windows development IDE provides. The use of GENCPGM is not required to build an application provided a proper development environment exists. To use this method, use the "-?" option for a list of features (most features follow the UNIX version of this script).
Specific build information for the Windows environment for Cobol, Fortran, and other 3GL programs is not available due to the number of vendors in the market. Though the environments vary, there is no reason to believe that the various compilers on Windows for these languages would not work since compilation on other platforms and using various other vendors does work. It is simply a question of understanding the product requirements and methods for creating and using external DLL libraries. Customer Support will glad to assist in researching issues and bringing them to the attention of the development staff for resolution if needed.
A Cobol API example (edaapp.cbl) is supplied in the etc directory, however, there is no Fortran API example.
iWay Software |