Thank you so much for replying. You go on my Christmas card list pal...
I will try to find out about that one.
I have been sent a dll called win95io.dll which, they claim, should do it. Problem is I don't know enough about API calls to complete it. Here is what they sent. Maybe you can advise, if not It may be worth copying for later.
Win95io, Version 1.01
Copyright (c) 1996-97 SoftCircuits Programming (R)
Redistributed by Permission.
Win95io.DLL is a 32-bit DLL that provides access to port input/output
(I/O) under Windows 95. It was written for use with 32-bit Visual
Basic since Visual Basic does not have I/O instructions. Note that,
due to the Win32 architecture, the DLL may not always behave exactly
as expected. This DLL is documented in more detail below.
This package may be distributed on the condition that it is
distributed in full and unchanged, and that no fee is charged for
such distribution with the exception of reasonable shipping and media
charges. The DLL may also be distributed with any programs you write
that use this DLL on the condition that you do not hold SoftCircuits
liable for any liabilities incurred as a result of such programs. In
addition, source code from any examples included with this package
may be incorporated into your own programs and the resulting programs
may be distributed in compiled form without payment of royalties.
SoftCircuits provides this software "as is" with no warranty of any
kind. We have attempted to provide software that may be useful and
attempted to describe those situations where we believe it is not be
useful. SoftCircuits makes no other claims with regards to this
software including claims that this documentation is accurate. Use
this software and documentation at your own risk.
This example program was provided by:
P.O. Box 16262
Irvine, CA 92623
While DOS and Windows 3.x applications may perform port I/O freely,
Win32 operating systems assume that port I/O is handled by device
drivers. As discussed in Microsoft KB article Q112298, attempting to
use the port I/O functions from within an application for Windows NT
running in user mode causes a privileged instruction exception to
occur. Although Windows 95 takes a similar approach, port access
under Windows 95 does NOT cause a protection fault. Thus the reason
for writing this DLL.
Although port access under Windows 95 does not cause a protection
fault, it may not always perform as expected. For example, if a DOS
application is accessing the same port, or a device driver has
control of the same port then a port read or write may be ignored.
Further, if you write a 32-bit application that uses this DLL, care
must be taken to prevent it from running under NT.
Declare Sub vbOut Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Declare Sub vbOutw Lib "WIN95IO.DLL" (ByVal nPort As Integer, ByVal nData As Integer)
Declare Function vbInp Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer
Declare Function vbInpw Lib "WIN95IO.DLL" (ByVal nPort As Integer) As Integer