home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1999 August
/
Chip_1999-08_cd.bin
/
sharewar
/
wscmclib
/
WSC4VB_U.TXT
< prev
next >
Wrap
Text File
|
1999-06-02
|
43KB
|
1,142 lines
Windows Standard Serial Communications
Library for Visual Basic
(WSC4VB)
USERS MANUAL
Version 2.4
June 1, 1999
This software is provided as-is.
There are no warranties, expressed or implied.
Copyright (C) 1999
All rights reserved
MarshallSoft Computing, Inc.
Post Office Box 4543
Huntsville AL 35815
Voice : 256-881-4630
FAX : 256-880-0925
email : info@marshallsoft.com
web : www.marshallsoft.com
_______
____|__ | (R)
--+ | +-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
--+--+ | +---------------------
|___|___| MEMBER
MARSHALLSOFT is a registered trademark of MarshallSoft Computing.
WSC4VB Users Manual Page 1
C O N T E N T S
Chapter Page
1.0 Introduction................................................3
1.1 User Support............................................4
1.2 ASP Ombudsman...........................................4
1.3 Awards..................................................4
1.4 Installation............................................5
1.5 Uninstalling............................................5
1.6 Limitations on COM Ports................................5
2.0 Library Overview............................................6
2.1 Dynamic Link Libraries..................................6
2.2 Using the Library.......................................6
2.3 Win32 STDCALL and DECLSPEC..............................6
2.4 Using Threads...........................................6
2.5 WSC Class...............................................6
3.0 Compiling Programs..........................................7
3.1 Compiling WSC...........................................7
3.2 Compiling Example Programs..............................7
3.3 EXCEL, ACCESS, and WORD.................................7
3.4 PowerBuilder and FoxPro.................................7
4.0 Modem I/O...................................................8
4.1 MIO Introduction........................................8
4.2 MIO Function Summary....................................8
5.0 XMODEM & YMODEM ............................................9
5.1 XYDRIVER Introduction...................................9
5.2 XYDRIVER Function Summary...............................9
6.0 ASCII File Transfer........................................10
7.0 Problems...................................................11
8.0 Example Programs...........................................12
8.1 EASY...................................................12
8.2 SELFTEST...............................................12
8.3 MODEM..................................................12
8.4 TERM...................................................13
8.5 FINDER.................................................13
8.6 ATOK...................................................13
9.0 Legal Issues...............................................14
9.1 Registration...........................................14
9.2 Academic Discount......................................14
9.3 License................................................15
9.4 Warranty...............................................15
10.0 Summary....................................................16
10.1 Revision History......................................16
10.2 WSC Function Summary..................................17
10.3 Further Reading.......................................18
11.0 Other MarshallSoft Computing Products for Visual Basic.....18
11.1 Personal Communications Library for Visual Basic......18
11.2 Personal Protocol Library for Visual Basic............18
11.3 Serial Libraries for Other Languages..................18
11.4 Internet Libraries....................................19
WSC4VB Users Manual Page 2
1.0 Introduction
The Windows Standard Serial Communications Library for Visual Basic
(WSC4VB) is an asynchronous communications dynamic link library
(DLL) which uses the standard Windows serial communications API.
Since it uses the Windows API, programs using the WSC library are
fully compatible with other Window applications which also use the
Windows serial communications API.
The WSC4VB dynamic link library (WSC32.DLL) can be called from any
WIN32 application capable of calling Windows API functions,
including those written in Delphi, Visual Basic, MS Access, MS Excel,
Fortran, COBOL, PowerBuilder, FoxPro, Power Basic Console Compiler,
dBase, etc. The library works under NT 4.0 and Windows 95/98, as well
as Windows 3.1 (Win16 only).
Using WSC is very straight-forward. For example, to write "HELLO" to
the serial port COM1:
Dim Text As String * 5
Dim Code As Long
Text = "HELLO"
Code = SioReset(COM1,512,512) 'open COM1 with 512 KB buffers
Code = SioPuts(COM1,Text,6) 'write "HELLO" to COM1
Code = SioDone(COM1) 'close COM1
Several Visual Basic example programs with full source code are included.
Refer to Chapter 8 for more details on each of the example programs.
EASY : A simple terminal emulator program.
SELFTEST : Performs COM port functionality testing.
MODEM : Same as EASY but controls flow control, modem
lines, etc.
TERM : Terminal emulator with XMODEM, YMODEM, and ANSI
terminal emulator support.
FINDER : Finds a modem connected to one of the serial ports.
ATOK : Similar to EASY but uses WSC class (WscClass.cls).
WSC4VB contains over 25 functions. All functions return a negative
number if an error condition is detected. For more details, consult
the WSC4VB Reference Manual (WSC4VB_R.TXT) and the RS232/485
Serial Communications Users Manual (ASYNC.TXT).
Our goal is to provide a robust serial communications library that
you and your customers can depend upon. Contact us if you have any
questions.
The shareware and registered versions are identical except that the
shareware version displays the "shareware" screen when first
starting, after 20 minutes of run time, and every 10 minutes after
that. The registered version also includes source code.
WSC4VB Users Manual Page 3
1.1 User Support
We want you to be successful in developing your applications using
WSC4VB! We depend upon our customers to let us know what they need in
a communications library. If you have any suggestions or comments,
please let us know.
If you are having a problem using WSC4VB, email us at
support@marshallsoft.com
You can also reach us at 256-881-4630 between 7:00 AM and 7:00 PM CST
Monday through Friday. You can also often get us on the weekend.
The latest versions of our products are available on our web site at
http://www.marshallsoft.com
and on our anonymous FTP site at
ftp://ftp.marshallsoft.com/marshallsoft
The MarshallSoft Computing newsletter "Comm Talk" is published
quarterly on our web site. It discusses various communications
problems and solutions using our products as well as related
information.
1.2 ASP Ombudsman
MarshallSoft Computing, Inc. is a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that the
shareware principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the member
directly, ASP may be able to help. The ASP Ombudsman can help you
resolve a dispute or problem with an ASP member, but does not provide
technical support for members' products. Please write to the ASP
Ombudsman at 157-F Love Ave., Greenwood, IN 26142 USA, FAX
317-888-2195, or send email to omb@asp-shareware.org.
1.3 Awards
WSC4VB has been rated 5 stars by ZDNET, which is their highest
rating.
Our other "Windows Standard Serial Communications Libraries" (for
C/C++ and Delphi) are one of the more popular downloads in the
shareware libaries category.
WSC4VB Users Manual Page 4
1.4 Installation
(1) Before installation of WSC4VB, your Visual Basic compiler should
already be installed on your system and tested. Note that Visual
Basic 4.0 (or up) is required in order to create Win32 programs.
(2) Create your WSC project directory, copy the WSC archive, then
unzip the archive. For example:
MKDIR WSC
PKUNZIP WSC4VB24.ZIP WSC 'registered users unzip WSC4VB.ZIP
Note: PKZIP for Windows and WINZIP can also be used to unzip.
(3) Run the install program INSTALL.BAT which will copy the correct
files for your installation (Visual Basic 3.0 or Visual Basic 4.0+).
If you are using Visual Basic 3 or 16-bit VB 4, then type:
INSTALL 16 'for Windows 95/98/NT or Windows 3.1
If you are using 32-bit Visual Basic 4 (or above), then type:
INSTALL 32 'for Windows 95/98/NT
The install program creates WSC4VB.BAS from either WSC16.BAS or
WSC32.BAS, and copies the proper DLLs. This way, the source code for
the example programs is identical for both Visual Basic 3 (Win16) and
Visual Basic 4 / Visual Basic 5 (Win32).
INSTALL will copy all DLLs to the C:\WINDOWS directory (or C:\WINNT
if running Windows NT), where Visual Basic can find them.
1.5 Uninstalling
Uninstalling WSC4VB is very easy. WSC4VB does NOT modify the
registry. First, delete the WSC4VB project directory created when
installing WSC4VB. Second, delete WSC16.DLL and WSC32.DLL from your
Windows directory, typically C:\WINDOWS for Windows 95/98 or
C:\WINNT for Windows NT. Thats it!
Running the UINSTALL.BAT batch file will also delete WSC16.DLL and
WSC32.DLL as described above.
1.6 Limitations on COM Ports
The 32-bit version of WSC4VB (WSC32.DLL) can use any port from COM1
to COM20, provided that the port is known to Windows 95/98/NT and
there is physical hardware present. More ports can easily be added by
recompiling WSC32.C.
The UART FIFO level can only be set from the Windows Control Panel.
The recommended receive side trigger level is 8 or 14 for 16550
UARTs. For more information on UARTS, see the RS232/485 Serial
Communications Users Manual (ASYNC.TXT).
WSC4VB Users Manual Page 5
2.0 Library Overview
2.1 Dynamic Link Libraries
WSC4VB uses a Win32 dynamic link library (WSC32.DLL). A DLL is
characterized by the fact that it need not be loaded until required
by an application program and that only one copy of the DLL is
necessary regardless of the number of application programs that use
it. Contrast this to the traditional static library which is bound to
each and every application that uses it at link time.
An important advantage that DLLs have over other "popular" library
formats such as VBX or OCX is that DLLs are callable by all Windows
applications. Since DLLs are the building blocks of the Windows
Operations System, they will not be replaced by a "newer technology".
2.2 Using the Library
The WSC4VB has been tested on multiple computers running Windows 3.1,
Windows 95/98, and Windows NT 4.0.
Please examine the WSC32.BAS file. Note that COM1 is defined as port
zero, not port one. The user must assume the responsibility for
passing the correct information when calling WSC4VB functions.
2.3 Win32 STDCALL and DECLSPEC
WSC32 is written in ANSI C and is compiled using the _stdcall and
_declspec keywords. This means that WSC4VB uses the same calling
conventions and file naming conventions as the Win32 API. In
particular, function names are NOT decorated. There is no leading
underscore nor trailing "@size" added to function names.
The WSC32.DLL functions may be called by any Windows application
program capable of calling the Windows API provided the proper
declaration file is used.
2.4 Using Threads
WSC4VB is thread safe, and can be used from any Windows application
capable of using threads.
2.5 WSC Class
The WSC class "wscClass" (wscClass.cls) is a Visual Basic class
wrapper for making calls to WSC32.DLL. The class name for each
function is the same as the DLL function, except the leading "wsc" is
replaced by "f".
Those functions that return strings do so by use of the "String
Result" property. Instantiate wscClass as any other class in VB:
Dim X As New wscClass
Refer to the ATOK project for an example of use. Use of wscClass is
limited to Visual Basic 5.0 and above.
WSC4VB Users Manual Page 6
3.0 Compiling Programs
Each of the example programs should be compiled and run. Before
beginning, be sure to run INSTALL that will copy the proper Win16 (or
Win32) files.
Refer to Section 8.0 "Example Programs" for more information on the
example programs.
3.1 Compiling WSC
WSC32.DLL is written in standard ANSI C (WSC32.C), and has been
compiled using Microsoft Visual C/C++ with the STDCALL and DECLSPEC
compiler keywords. Source code for the WSC library is provided in the
registered version only.
WSC32.C may also be compiled using Borland C/C++ or Watcom C/C++
compilers. If you recompile WSC32.C using Borland or Watcom
compilers, the resulting WSC32.DLL can only be used by applications
compiled with the same compiler, unless the "_stdcall" and
"_declspec" keywords are specified.
For more information on the C/C++ version of WSC, download the latest
version of WSC4C from our web site at www.marshallsoft.com.
3.2 Compiling Example Programs
Visual Basic MAK files are provided with all example programs. All
example source code is saved in Visual Basic 3.0 format so that it
can be read by all versions of Visual Basic.
3.3 EXCEL, ACCESS, and WORD
WSC can be used with Microsoft VBA (Visual Basic for Applications)
applications such as EXCEL, ACCESS, and WORD. Note that WSC16.DLL
must be used for 16-bit applications, even if running under Windows
95/98 or NT. See EXCEL.TXT, ACCESS.TXT, and WORD.TXT for more
information.
3.4 PowerBuilder and FoxPro
WSC can also be used with Power Builder and FoxPro applications.
WSC.PBI : Power Builder declaration file.
WSC.PRG : FoxPro declaration file.
See PBUILDER.TXT and FOXPRO.TXT for more information.
WSC4VB Users Manual Page 7
4.0 MODEM I/O (MIO)
4.1 MIO Introduction
The file MIO32.BAS contains prototypes for using the Modem I/O DLL.
These functions ease communicating with modems using AT commands.
The MIO functions are broken down into parts called states, and
control is returned to Windows between executing each state.
For example:
(1) Send the string to the MIO driver by executing:
Code = mioSendTo(Port,100,"!ATDT1,256,880,9748")
The '!' characters are converted to carriage returns. The text
string is copied into the driver's data area.
(2) Call mioDriver (typically based on a timer) until MIO_IDLE is
returned. Each time mioDriver is called, it will send another
character to the modem provided the required delay (since the
previous character was sent) has passed. If the delay has not
passed, the driver simply returns MIO_RUNNING, but without actually
sending a character to the modem. Once all characters have been
sent, mioDriver will return MIO_IDLE, indicating it is done and is
ready to accept another function.
mioDriver will return MIO_RUNNING if it is still processing. Any
other return value indicates that it is still processing and the
returned value is a character from the modem that can be displayed if
wanted.
(3) Once mioDriver returns MIO_IDLE, call mioResult to get the
result of the mioSendTo call.
4.2 MIO Function Summary
mioDriver : Drives the execution of mioSendTo, mioWaitFor, or
mioQuiet once they have been started.
mioBreak : Forces the MIO driver to IDLE state.
mioSendTo : Sends a string (including control chars) to the modem.
mioWaitFor : Waits for a particular string from the modem, passing
all else through.
mioQuiet : Waits for continuous quiet of a specified duration.
mioBreak : Breaks further modem I/O activity.
Refer to the WSC4VB Reference Manual (WSC4VB_R.TXT) for more
detailed information.
WSC4VB Users Manual Page 8
5.0 XMODEM & YMODEM
5.1 XYDRIVER Introduction
The XMODEM & YMODEM functions are implemented in XYDRV as a DLL
(Dynamic Link Library), and are state driven like the Modem I/O
functions described in the previous section. The TERM program
provides an example of using XYDRV.
Files can be sent and received using XMODEM, XMODEM/CRC, XMODEM/1K,
and YMODEM. The basic procedure used to run XMODEM or YMODEM is as
follows:
(1) Call xyAcquire() immediately after calling SioReset().
(2) To receive a file, call xyStartRx(), then call xyDriver()
repeatedly until XY_IDLE is returned.
(3) To send a file, call xyStartTx(), then call xyDriver() repeatedly
until XY_IDLE is returned.
(4) Call xyRelease() immediately before calling SioDone().
Refer to the TERM program for examples of calling the XYDRV
functions.
5.2 XYDRIVER Function Summary
xyAbort : Abort driver at any time.
xyAcquire : Acquire a port.
xyDebug : Set the debug level.
xyDriver : Executes the next state or states.
xyGetMessage : Get the next debug message.
xyGetParameter : Get a driver parameter.
xyGetFileName : Get name of file being sent or received.
xyRelease : Release a port.
xySetParameter : Set a driver parameter.
xyStartRx : Start a receive.
xyStartTx : Start a transmit.
Refer to the WSC4VB Reference Manual (WSC4VB_R.TXT) for more detailed
information.
WSC4VB Users Manual Page 9
6.0 ASCII File Transfer
6.1 ASCII Protocol
The "ASCII Protocol" is not a defined protocol, but rather it is a
loose set of conventions developed over a period of years by BBS
operators. Because XON/OFF flow control is used, only ASCII text can
be transferred. The ASCII protocol is implemented as a DLL and is
state driven like the MIO and XYDRIVER code.
(1) Call ascInit(Port,RxQueSize,xFlag) to do initialization, where
Port = The connected port (COM1, COM2, etc).
RxQueSize = The size of the Rx Queue as passed to SioReset().
xFlag = 1 if this module will perform XON/XOFF flow control.
Set to FALSE if flow control is being performed by the
WSC code (you called SioFlow()).
(2) To send an ASCII file, call
ascStartTx(FileName,CharPace,TermChar,EchoFlag), where
FileName = The path & name of the file to send.
CharPace = The delay in milliseconds between characters.
TermChar = The termination character to send after the file
has been sent. If none, use 0x00.
EchoFlag = 1 if screen echo is desired.
Then call ascDriver() until it returns IDLE (1).
(3) To receive an ASCII file, call
ascStartRx(FileName,TermChar,FirstWait,CharWait,EchoFlag), where
FileName = The path & name of the file to send.
TermChar = The termination character. If none, use 0x00.
FirstWait = The maximum number of seconds to wait for the
first incoming character.
CharWait = The maximum number of seconds after which it is
assumed that the other side has completed sending.
If unsure, set this to 3 seconds.
EchoFlag = 1 if screen echo is desired.
Then call ascDriver() until it returns IDLE (1).
6.2 ASCII Function Summary
ascAbort : Abort driver at any time.
ascDriver : Executes the next state or states.
ascGetMessage : Get the next debug message.
ascGetParameter : Get a driver parameter.
ascGetFileName : Get name of file being sent or received.
ascInit : Initialize the driver.
ascStartRx : Start a receive.
ascStartTx : Start a transmit.
WSC4VB Users Manual Page 10
7.0 Problems
If you cannot get your application to run properly, first compile and
run the example program EASY.BAS. Test EASY by connecting two
computers with a null modem cable or by connecting a modem to a
serial port.
Once EASY runs, compile and run the SELFTEST program. This program
will test your serial ports' functionality.
If your application does not run but EASY and SELFTEST run correctly,
then you have most likely made a programming mistake in your
application. MarshallSoft Computing cannot debug your application,
especially over the telephone! However, consider each of the
following when searching for an error in your application.
1. Have you included the file WSC32.BAS in your application ?
2. Are your receive and transmit buffers large enough ? Use a buffer
size that is twice the size of the largest expected block.
3. Have you selected too high a baud rate? Windows can multitask
many tasks at once. You may have to lower your baud rate (or get
16550 UARTS).
4. Did SioReset return a zero value ? If not, then you must call
SioReset again. See EASY.BAS for an example.
5. Did you send the proper initialization string to your modem ?
Did you set DTR and RTS? (you should).
7. Are you trying to link a 32-bit DLL to a 16-bit program (or vice
versa)? The typical error message refers to a "corrupted" DLL file.
Keep Win16 & Win32 development separate.
8. If you are using the registered version of WSC and you are still
getting the shareware screen, make sure you have deleted all copies
of the WSC shareware DLL's in the Windows search path.
9. If you do not have the WSC4VB.BAS file, you have not run
INSTALL.BAT.
We recommend the following steps if you believe that you have
discovered a bug in the library: (1) Create the smallest, simplest
test program possible that demonstrates the problem. (2) Document
your exact machine configuration and what error the test program
demonstrates. (3) Email us the example source.
If the problem can be solved with an easy work-around, we will
publish the work-around. If the problem requires a modification to
the library, we will make the change and make the modified library
available to our customers without charge.
WSC4VB Users Manual Page 11
8.0 Example Programs
The example programs are designed to demonstrate the various
capabilities of WSC4VB. The best way to become familiar with WSC4VB
is to study and run the example programs.
8.1 EASY
EASY is a very simple communications program using WSC4VB. Everything
that is typed on the keyboard is sent to the serial port, and
everthing incoming from the serial port is displayed on the screen.
The easiest way to test EASY is to connect to a modem. Typing 'AT'
should result in an 'OK' being displayed.
A null-modem cable can also be used to connect two computers together
with their serial ports. Run EASY on both machines. Whatever is typed
on one machine will be displayed on the other.
8.2 SELFTEST
SELFTEST performs a serial port I/O functionality test. Either a pair
of ports on the same computer (using a null modem cable) or a single
port (using a loopback adapter) can be tested.
Refer to LOOPBACK.TXT for an explanation of how to make a loopback
adapter (without tools!).
8.3 MODEM
MODEM is similiar to EASY, but with enhanced capability. It can set
flow control (hardware, software, or none), DTR line (set or clear),
RTS line (set or clear), display the transmit & receive queue sizes,
detect a break signal, detect changes in DSR and CTS, as well as
check for various line errors (parity error, framing error, data
overrun, receive queue overflow, and transmit buffer full).
WSC4VB Users Manual Page 12
8.4 TERM
TERM is a simple terminal emulator suitable for calling up a BBS and
downloading or uploading files using XMODEM or YMODEM. The TERM
program uses MIO.DLL for modem control commands, ASDRV.DLL for the
ASCII protocol, and the XYDRV.DLL for XMODEM & YMODEM protocol.
Selecting 'Dial' from the menu bar will result in a pop-up dialog
requesting the phone number to dial. Once entered, the number is
dialed, and the program will wait for up to 60 seconds for the
'CONNECT' string from the modem. This wait can be terminated at any
time by choosing 'BREAK' on the menu bar.
Once logged on, files can be uploaded or downloaded by selecting
'Send' or 'Receive' from the menu bar. To abort a file transfer,
choose 'BREAK' from the menu bar then type a series of Ctrl-X (^X)
characters from the keyboard.
8.5 FINDER
The FINDER program searches for a connected modem. Your modem must be
connected to one of COM1, COM2, COM3, or COM4, and must be turned on.
FINDER takes no arguments. After connecting your modem to one of your
serial ports, type
FINDER
8.6 ATOK
The ATOK program demonstrates the use of the Visual Basic class
"wscClass.cls". The program transmits an "AT" to the serial port, and
receives the response. If the serial port is connected to a modem,
sending an "AT" should result in "OK" being received and displayed.
WSC4VB Users Manual Page 13
9.0 Legal Issues
9.1 Registration
WSC4VB may be registered for $85 plus $7 S&H ($12 outside of North
America).
To order, contact us as shown on the title page of this manual. All
prices are guaranteed for one year from the release date.
Multiple copy discounts (3 or more) and site licenses are available.
Please call for details.
We accept American Express, VISA, MasterCard, Discover, checks in US
dollars drawn on a US bank, International Postal Money Orders,
purchase orders (POs) from recognized US schools and companies listed
in Dun & Bradstreet, and COD (street address and phone number
required) within the USA (plus a $5 COD charge).
For credit card orders, be sure to include the account number, the
expiration date, the exact name on the card, and the complete card
billing address (address to which the credit card bill is mailed).
Note that all ordering information collected, including email
addresses, is kept strictly confidential.
Print the file INVOICE.TXT if a "Pro Forma" invoice is needed.
If you wish to update from an older version of WSC4VB, updates are
$30 plus $7 S&H ($12 S&H outside of North America). The registered
package includes:
o Win16 / Win32 WSC4VB Libraries w/o shareware screens.
o Win16 / Win32 source code for WSC, MIO, and XYDRIVER.
o Printed Users Manual, Reference Manual, and RS232 Manuals.
o Telephone and email support for one year.
The registered user will receive the latest version of WSC4VB shipped
by US second day priority mail (packet airmail overseas). A 3.5"
HD diskette is provided.
9.2 Academic Discount
We offer an "academic price" of 40% off the normal price for prepaid
email orders to faculty and students currently enrolled in any
accredited high school, college, or university. To qualify for the
discount, your school must have a web site and you must have an email
address at your school.
When ordering, ask for the "academic discount", or enter "student at"
(or "faculty at") and your schools web site address (URL) in the
comments field of the order form on our web site order page.
This offer is not retroactive and cannot be used with any other
discount. Products bought with academic pricing can not be used for
any commercial purpose.
WSC4VB Users Manual Page 14
9.3 License
MarshallSoft Computing, Inc. grants the registered user of WSC4VB the
right to use one copy of the WSC4VB library (in object form) on a
single computer in the development of any software product (other
than libraries such as WSC4VB). The user may not use the library on
more than one computer at the same time. The source code for the
library (WSC16.C, WSC32.C, MIO.C, XYDRV.C, ASDRV.C) is copyrighted by
MarshallSoft Computing and may not be released in whole or in part.
The registered DLLs may be distributed (without royalty) in object
form only, as part of the user's compiled application. The
registered DLL's may NOT be distributed as part of any software
development system (compiler or interpreter) without our express
written permission.
9.4 Warranty
MARSHALLSOFT COMPUTING, INC. DISCLAIMS ALL WARRANTIES RELATING TO
THIS SOFTWARE, WHETHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND
SPECIFICALLY DISCLAIMED. NEITHER MARSHALLSOFT COMPUTING, INC. NOR
ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR
DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT,
CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE SUCH SOFTWARE EVEN IF MARSHALLSOFT COMPUTING, INC.
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO
EVENT SHALL MARSHALLSOFT COMPUTING, INC.'S LIABILITY FOR ANY SUCH
DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE
SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE
SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE
SOFTWARE.
Some states do not allow the exclusion of the limit of liability for
consequential or incidental damages, so the above limitation may not
apply to you.
This agreement shall be governed by the laws of the State of Alabama
and shall inure to the benefit of MarshallSoft Computing, Inc. and
any successors, administrators, heirs and assigns. Any action or
proceeding brought by either party against the other arising out of
or related to this agreement shall be brought only in a STATE or
FEDERAL COURT of competent jurisdiction located in Madison County,
Alabama. The parties hereby consent to in personam jurisdiction of
said courts.
WSC4VB Users Manual Page 15
10.0 Summary
10.1 Revision History
Version 2.0: February 17, 1997.
o Includes Win16 and Win32 libraries.
o Added XMODEM & YMODEM DLL (XYDRV.DLL).
o Added TERM example program.
Version 2.1: June 9, 1997.
o Screen display uses MEMO class.
o WIN32 version can display error text from Win32 Windows.
o Added FIND example program.
o Added SioRead function.
o SioInfo can return seconds to expiration [SHAREWARE].
Version 2.2: November 1, 1997.
o XYDRV code fixes bugs.
o Added xyGetFileName function to XYDRV.
o Supports up to 16 ports.
o WSC4VB runs under Windows NT.
o Added ASCII protocol (ASDRV).
Version 2.3: August 14, 1998
o Improvements to XYDRIVER (XMODEM and YMODEM).
o SioTimer function added.
o SioBaud and SioParms can be called before SioReset.
o Declaration files for Power Builder added.
Version 2.4: June 1, 1999
o Improvements made to XYDRIVER (XMODEM and YMODEM).
o Added SioEvent function (Win32 only).
o WSC Class added (VB 5.0 & up)
o Added ATOK example program (VB 5.0 & up).
WSC4VB Users Manual Page 16
10.2 WSC Function Summary
Refer to the WSC4VB Reference Manual (WSC4VB_R.TXT) for detailed
information.
Refer to the RS232/485 Serial Communications Users Manual
(ASYNC.TXT) for technical information on UARTs, modems, and other
RS232/485 issues.
A one line summary of each function follows:
+-------------+-----------------------------------------------------+
| SioBaud | Sets the baud rate of the selected port. |
| SioBrkSig | Asserts, cancels, or detects BREAK signal. |
| SioCTS | Reads the Clear to Send (CTS) modem status bit. |
| SioDCD | Reads the Data Carrier Detect (DCD) modem status. |
| SioDone | Terminates further serial processing. |
| SioDSR | Reads the Data Set Ready (DSR) modem status bit. |
| SioDTR | Set, clear, or read the Data Terminal Ready (DTR). |
| SioEvent | Efficiently waits for specified serial event. |
| SioFlow | Enables / disables hardware flow control. |
| SioGetc | Reads the next character from the serial line. |
| SioGets | Receives a string of characters. |
| SioInfo | Returns information such as library version. |
| SioParms | Sets parity, stop bits, and word length. |
| SioPutc | Transmit a character over a serial line. |
| SioPuts | Transmits a string of characters. |
| SioRead | Reads any UART register. |
| SioReset | Initialize a serial port for processing. |
| SioRI | Reads the Ring Indicator (RI) modem status bit. |
| SioRTS | Sets, clears, or reads the Request to Send (RTS). |
| SioRxClear | Clears the receive buffer. |
| SioRxQue | Returns the number of characters in the RX queue. |
| SioStatus | Returns the serial port line status. |
| SioTimer | Returns the system times in milliseconds. |
| SioTxClear | Clears the transmit buffer. |
| SioTxQue | Returns the number of characters in the TX queue. |
| SioUnGetc | "Ungets" (puts back) a specified character. |
| SioWinError | Returns Win32 error message as text. |
+-------------+-----------------------------------------------------+
WSC4VB Users Manual Page 17
10.3 Further Reading
The best way to learn about serial communications is to read a good
book on the subject. Several good texts are available. Two that I
like are:
(1) C Programmer's Guide to Serial Communications by Joe Campbell
(SAMS) (2) Mastering Serial Communications by Peter Gofton (SYBEX).
Don't forget to read over the RS232 Users Manual (RS232.TXT). For
more detailed information on XMODEM, YMODEM, and ZMODEM, download
PPL4VB (see 11.2 below).
11.0 Other MarshallSoft Computing Products for Visual Basic
Several shareware products are available from MarshallSoft Computing.
11.1 The Personal Communications Library for Visual Basic / DOS
Personal Comm Library for Visual Basic. (PCL4VB62.ZIP), Jan 99, Ver
6.2, [ASP]. Supports COM1 thru COM20 to 115200, 4 plus ports
concurrently, many dumb multiport boards, 16550, 16650, 16750 UARTs,
interrupt driven, RTS/CTS flow control, any UART address and IRQ.
Requires VBDOS compiler. $85 + S&H.
11.2 The Personal Protocol Library for Visual Basic / DOS
Personal Protocol Library for Visual Basic (PPL4VB20.ZIP), April 95,
Ver 2.0, [ASP]. PPL4PB is a protocol library supporting ASCII,
XMODEM, XMODEM-CRC, XMODEM-1K, YMODEM, YMODEM-G, and ZMODEM
protocols. Requires the Personal Communications Library for VBDOS
(PCL4VB). $40.
11.3 Serial Libraries for Other Languages
We have communications libraries for C/C++, Turbo Pascal, Visual
Basic, and Power Basic. All PCL libraries support the 8250, 16450,
16550, 16650, and 16750 UARTs. Check our WEB site.
PCL4C : C/C++, DOS (includes 16-bit protected mode).
PCL4P : Turbo Pascal, DOS (includes 16-bit protected mode).
PCL4VB : Visual Basic, DOS (VBDOS).
PCL4PB : Power Basic, DOS.
PCL4W : C/C++, Windows 3.1 & Win 95/98, talks to hardware directly.
PCLVBW : Visual Basic, Win 3.1 & Win 95/98, talks to hardware directly.
WSC4C : C/C++, Win 3.1/95/98/NT. Uses Windows API.
WSC4VB : Visual Basic, Win 3.1/95/98/NT. Uses Windows API.
WSC4D : Borland Delphi, Win 3.1/95/98/NT. Uses Windows API.
WSC4PB : Power Basic Console Compiler, Win 95/98/NT. Uses Win API.
WSC4VB Users Manual Page 18
11.4 Internet Libraries
WIL4C : C/C++, Win 3.1/95/98/NT. The "Winsock Interface Library"
supports TCP,SMTP,POP3,TELNET,FTP, etc.
WINSOCK INTERFACE LIBRARY for C/C++. Win16 & Win32 DLLs.
(WIL4C20.ZIP). Feb 14, 1998. Version 2.0, [ASP]. The
Winsock Interface Library simplifies winsock network
communications programming and provides support for the
most common Internet protocols such as Finger, SMTP, POP3,
FTP, NNTP, and HTTP. Requires windows C compiler.
Registration is $95 + $7 S&H ($12 overseas).
SEE4C : C/C++, Win 3.1/95/98/NT. The simplest way to email from your
C/C++ application, including MIME attachments.
SMTP/POP3 Email Engine for C/C++. Ver 3.0. Win16 and Win32
DLLs. (SEE4C30.ZIP) 4/1/99. Email from your C/C++
application. Simple API allows sending & receiving email,
including MIME attachments. Knowledge of Winsock and TCP/IP
is not needed. Includes multiple C/C++ examples. Requires
windows C/C++ compiler. Registration is $95.
SEE4VB : Visual Basic, Win 3.1/95/98/NT.
SEE4PB : Power Basic, Windows 95/98/NT.
SEE4D : Delphi, Win 3.1/95/98/NT.
SEE4DB : Visual dBase, Windows 95/98/NT.
SEE4FP : Visual FoxPro, Windows 95/98/NT.
SEE4F : ABSOFT Fortran, Windows 95/98/NT.
SEE4CB : Fujitsu COBOL, Windows 95/98/NT.
WSC4VB Users Manual Page 19