Chapter 4: SOFTWARE
The software shipped with the ATRWDT and ATXWDT includes example software for Windows 3.11, Windows 95 and Windows NT written for Borland C++ 5.01, Microsoft Visual C++ 4.0 and Microsoft Visual BASIC 4.0. Also included is a Windows NT 4.0 device driver.
Windows NT and Windows 95
Windows NT restricts access to the I/O ports of the computer to device drivers, so a simple OUT command cannot be used to communicate with the watchdog timer. A device driver, for use with Windows NT 4.0 or later, is included with the watchdog timer software to allow access to the watchdog timer under Windows NT. A
Windows 95 is less restrictive than Windows NT on the access of the computer’s I/O ports. A simple OUTP command can be used in Borland C++ or Microsoft Visual C++ to communicate with the watchdog timer. However, using the DLL will allow the same program to run under both Windows 95 and Windows NT. Visual BASIC does not have a command to access the I/O ports of the computer, so the DLL must be used. A Visual BASIC program must include definitions for the routines in the DLL in order to call them. The file, PCWDT.BAS, contains definitions for these function and can be included in the Visual BASIC project by selecting ADD FILE under the FILE menu.
In a Borland C++ or Microsoft Visual C++ program, each module calling the watchdog timer routines must include the file, PCWDT.H. This file contains the definitions for the functions in the DLL. The file, BBPCWDT.LIB, must be included in the project to inform the linker that it is using a DLL. Note that the BBPCWDT.LIB file for Borland C++ and Microsoft Visual C++ are not the same, so they are not interchangeable. A console mode program, written in C, is provided to demonstrate the use of the DLL functions. Both Borland C++ and Microsoft Visual C++ project files are included to make it easier to recompile the example program. The file, MKIMPLIB.BAT, is provided as an example of how to create the import library, BBPCWDT.LIB. It may be necessary to recreate the import library if the application is not compiled with Borland C++ version 5.01 or Microsoft Visual C++ version 4.0.
Documentation Number | 13 |
B&B Electronics Mfg Co – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph