laygontx.sys is a dynamically loadable Windows NT Kernel-Mode Device Driver (KMD) which provides LayGO communication services to Win32 applications. (The x in laygontx.sys is replaced by a single hexadecimal digit 0-F depending on the type of hardware the KMD drives.) laygontx.sys is accessed exclusively through laygo32.dll.
To install laygontx.sys, simply copy it from the LayGO drv directory to the Windows NT System32\Drivers directory.
laygontx.sys runs as a system kernel-mode service. An entry in the system Registry determines when the Windows NT Service Manager loads the driver. See the Registry section below for details.
Use of laygontx.sys requires that the proper communication board be installed in the PC. A second KMD called laygont6.sys is also provided. laygont6.sys is a hardware emulation KMD. When used in place of laygontx.sys, laygont6.sys emulates a 2 line communication board. When laygont6.sys is configured for internal loopback mode, data written on a line is looped back on the same line. Otherwise, lines 0 and 1 are connected so that signals and data output on one line are received on the other. Since laygont6.sys emulates the communication hardware in software, it can be used without any communication board installed.
Both the emulation driver and the actual hardware driver can be installed at the same time.
In order for the Windows NT Service Manager to load the KMD, you must put entries in the system Registry identifying the driver. The entries go under:
The LayGO drv directory contains 2 .reg files which can be used to create the Registry entries.
These files can be edited with any text editor. To write the entries into the Registry, simply double-click the file name in Windows explorer.
The Registry values can also be entered and edited manually using the Windows NT utility regedt32, which is part of your Windows NT distribution.
In the Laygontx section of the Registry, the value of Start determines when the Service Manager starts the KMD.
No other values in the Laygontx section should be changed.
The values in the Laygontx\Parameters section identify the type and number of boards installed and which system hardware resources the KMD must reserve when it is initialized by the Service Manager. Hardware resources are automatically allocated for PCI boards and PCMCIA cards. Only ISA boards require manual hardware configuration. (See PCMCIA Card Support in Windows NT 4.0 for additional instructions for PCMCIA cards.)
The values in the Laygontx\Parameters section are the same as those in the hardware configuration profile used to initialize the LayGO protocol stack. The only difference is in how some of the values are specified.
The parameter set for the first board (board 0) is placed in a subkey called Board0. Parameter sets for additional boards should be placed in subkeys Board1, Board2 and Board3.
If the KMD cannot reserve the required resources, it will fail to load with an "Insufficient resources" error. This generally means that the configuration values in the Registry are incorrect or in conflict with values used by other hardware. If error logging is enabled (setting the DoEventLogging entry in the Registry to 0x1), a diagnostic message will also be written into the event log by the driver. The event can be examined using the Windows NT utility program eventvwr. Event logging by the LayGO driver is enabled by default.
After configuring the hardware, installing the driver and creating the Registry entries, reboot the system so that the operating system can become aware of the new service. You should be able to load the driver. You can load the driver manually using the Devices applet in the Control Panel, or you can use the command prompt. At the command prompt enter:
> net start laygontx The laygont service was started successfully.
The command net stop laygontx unloads the driver.
In order for the stack to locate the correct driver(s) during stack initialization, a system stack configuration is required. The file stackx.cfg located in the LayGO cfg directory contains a system stack configuration for the laygontx.sys driver. Applications should load this file by calling lgo_ConfigureStack() prior to initializing the stack. If no system stack configuration is loaded, the emulation driver is used by default.
All LayGO API functions are exported by 2 DLLs:
laygo32.dll is accessed internally by these DLLs. The library files laygo32a.lib and laygo32m.lib are import libraries for linking applications.
laygo32x.dll contains the X.25 call setup data encoding and decoding functions from call.h, and the X.25 diagnostic and cause code conversion functions from diag.h. laygo32X.lib is the import library for this DLL.
laygo32d.dll contains the device library functions from device.h. laygo32d.lib is the import library for this DLL.
laygo32S.dll and laygo32y.dll contain routines which can be called from 32-bit versions of programs such as Visual Basic.
You may wish to copy the LayGO DLLs to your Windows NT System32 directory.
C Language prototypes for all functions are found in the .h files in the LayGO inc directory.