LayGO for Windows 9x

Virtual Device Drivers (VxDs)

laygo32x.vxd is a dynamically loaded Windows 9x Virtual Device Driver (VxD) which provides LayGO communication services to Win32 applications. (The x in laygo32x.vxd is replaced by a single hexadecimal digit 0-F depending on the type of hardware the VxD drives.) laygo32x.vxd is accessed exclusively through laygo32.dll.

LayGO VxDs for PCI boards and PCMCIA cards support Windows Plug and Play installation. See Windows 9x Plug and Play for instructions on installing these VxDs.

To install a VxD for an ISA board, simply copy laygo32x.vxd from the LayGO drv directory to your Windows System directory.

Use of laygo32x.vxd requires that the proper communication board be installed in the PC. A second VxD called laygo326.vxd is also provided. laygo326.vxd is a hardware emulation VxD. When used in place of laygo32x.vxd, laygo326.vxd emulates a 2 line communication board. When laygo326.vxd 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 laygo326.vxd 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.

The Registry

In order for the Windows Device Manager to load the VxD, you must put entries in the system Registry identifying the driver. The entries go under:

HKEY_LOCAL_MACHINE\Software\Advanced Relay\Laygo\Laygo32x


HKEY_LOCAL_MACHINE\Software\Advanced Relay\Laygo\Laygo32x\Parameters

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 utility regedit, which is part of your Windows distribution.

The values in the Laygo32x\Parameters section identify the type and number of boards installed and which system hardware resources the VxD must reserve when it is initialized by the Device Manager. The values in this 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 VxD 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.

The VxD is loaded automatically when the stack is initialized by the application.

Stack Configuration

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 laygo32x.vxd 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.

Dynamically Linked Libraries (DLLs)

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.

laygo32u.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 System directory.

C Language prototypes for all functions are found in the .h files in the LayGO inc directory.

Excluding Dual-ported RAM and Memory-mapped I/O Areas

If the communication board shipped with this disk uses dual-ported RAM and/or memory-mapped I/O, the host RAM areas you choose to map this memory to must be excluded from use by the Windows memory manager.

The Hardware Installation Guide explains how to do this if you are starting Microsoft's emm386 from your config.sys file. An alternative method is available under Windows using an EMMExclude entry in the [386Enh] section of the system.ini file. For example, to exclude the 64K page of host RAM starting at segment D000h, add the following line to the [386Enh] section of the system.ini file:


You can use multiple EMMExclude entries if more than one area is required. Make sure that the areas you exclude match those specified in the Registry.

Host PC DMA Channels

Some communication boards can be configured to use the host PC's DMA channels to improve throughput. By default, laygo32x.vxd attempts to acquire DMA channels 1 and 3 for use by these boards. If these channels will not be used, they can be freed for use by other programs by placing an entry in the Registry under:

HKEY_LOCAL_MACHINE\Software\Advanced Relay\Laygo\Laygo32x\Parameters\Boardn

DWORD     UseHostDma     value: 0

To restore use of host DMA, set the value to 1.

When laygo32x.vxd does not acquire these DMA channels, any attempt to configure use of DMA will result in a hardware initialization failure error.