Windows 95 runs most 16-bit applications, including those that reference the SEC board with direct IN and OUT instructions, just fine. One option is certainly to stay with those older apps.
But most 32-bit languages no longer allow direct access to I/O ports, getting us ready, no doubt, for protected environments such as NT. For the present, I/O port access can be gained by the use of assembly language, either in C or in Delphi.
A more elegant solution would be to use object oriented programming to encapsulate SEC access in a class. That way only the class needs to change when the rules change; the application using the class object can evolve gracefully. Here we present such an object-oriented demo program in Borland's Delphi, and our latest addition, a C++ API class for the SEC.
For a simpler solution that combines ease of use with easy portability between Windows 95 and Windows NT, may we suggest our DLL series, a library of routines callable from C, Visual Basic, or Delphi, that form a thin layer between your application and Win32.
For those who may want to back-port existing Windows NT code to Windows 95 without rewriting it using oop techniques, we offer a little VxD that allows the use of CreateFile() and DeviceIoControl() calls with little modification.
Windows 95 has Plug and Play with a vengeance. The SEC is a "Legacy" (non-PnP) board that the OS does not know about. Here are FCS's recommendataions for preventing port conflicts.
Windows NT does not allow application programs to access the SEC directly. FCS provides an SEC driver. Version 1.4 (Nov 95), and Version 1.8 (Aug 97),
The instructions for driver V1.4 called for the use of the Microsoft utility regini.exe, which unfortunately is no longer a "redistributable". V1.8 has some workarounds, or see our FAQ.
Once the driver is installed, a 32-bit app opens the driver, performs read, write, and ioctl operations, the closes the driver. We have simple examples coded in C and Delphi.
FCS also supports Legacy 16-bit apps with a VDD (a virtual device driver) that traps references to the references to the four-port range of the SEC and calls the SEC driver to perform the operations. Most Legacy 16-bit apps, Dos and Windows 3.1, will run without modification.
As mentioned above, the approach that evolves most gracefully involves object-oriented programming. To illustrate that, we have ported the Delphi object-oriented demo program and the C++ API class to Windows NT by changing the class methods to call the SEC driver.
And, plugging our latest addition once again, the DLL page shows how easy it can be to write applications that work on both Windows NT and Windows 95.