RAS Semaphore Autodialer - Readme file
======================================

This is a simple program used to control DUN and RAS connections
from a DOS batch file running under Windows 95/98/NT.

"Semaphore files" are created during the program operation.  These
are simply dummy text files placed into the root directory of the hard
drive.  There are two semaphores that are used by the program.

C:\ONLINE.NOW      = This semaphore is created by the dialer upon the
                     successful connection to the dial up server or
                     RAS server.

C:\HANGUP.NOW      = This semaphore is created by any process or batch
                     file.  It will terminate the active connection.

C:\ERROR.NOW       = This semaphore if the dial up is terminated with
                     an error.  The batch file can check for the existance
                     of this semaphore to decide what to do.

Your batch file or program can check for the existence of the ONLINE.NOW
semaphore file in the root directory of the hard drive.  This is typically
used to cause the program to "wait" until a connection has been established.

Under Windows 95/98, DOS batch files do NOT wait after execution of
a Windows program.  Look at the following batch file for an example:

CONNECT.BAT
===========

@ECHO OFF
ECHO Dialing Host Computer...
RASDIAL.EXE     
:WAITHERE
IF EXIST C:\ERROR.NOW GOTO ERROREND
IF NOT EXIST C:\ONLINE.NOW GOTO WAITHERE
ECHO Verifying Host Computer Availability...
PING 200.200.200.200
ECHO Mapping drive X to Server...
NET USE X: \\REMOTEHOST\DRIVE_C
ECHO Transferring Files to Server...
XCOPY C:\DATABASE\*.TPS X:\DATABASE\*.TPS
ECHO Disconnecting...
COPY C:\CONFIG.SYS C:\HANGUP.NOW
GOTO END
:ERROREND
ECHO Could not connect to Host System ...
ERASE C:\ERROR.NOW
:END


In the batch file above, the IF EXIST command will wait for the
dialer program to place it's ONLINE.NOW semaphore file in the root
directory, before the rest of the batch file executes.

An initialization file named DIALRAS.INI is placed into the same
directory as the DIALRAS program.  The layout of the file is as
follows:

DIALRAS.INI
===========

[AutoDial]
Connectoid=(your connectoid here)
UserName=(your username here)
Password=(your password here)

The connectoid is spelled exactly as you have the dial-up named
in dial-up-networking or RAS.  Your username and password have
to be placed into the INI file, even though they may be saved
with the connectoid.

This program requires the installation of a freeware OCX called
SocketWrench.  A copy of the 32-bit version of the OCX is included
with in the .ZIP file.  You MUST register the OCX into the system
registry.  To do this, copy the CSRAS32.OCX file into the
C:\WINDOWS\SYSTEM folder. Now type the following command at the
DOS prompt:

C:\WINDOWS\SYSTEM\REGSVR32 C:\WINDOWS\SYSTEM\CSRAS32.OCX

Also, you must make sure the following libraries are present:

MFC42.DLL       4.21.7303
MSVCRT.DLL      5.00.7303
MSVCIRT.DLL     5.00.7022
OLEAUT32.DLL    2.20.4118
OLEPRO32.DLL    5.0.4118

Note that you may also download the full version of SocketWrench
for free from www.catalyst.com.  When you run the SETUP.EXE program
included there, all of the libraries and OCX'es needed will be
registered for you.  Also, if you want to change or enhance the source code
you must perform this download.

The DIALRAS.CLW code is FREEWARE!

Source code for the program is included in the ZIP file.  Feel free
to modify to your heart's content, but please post any changes to
share with the Clarion community.  Much thanks to Jeff Slarve for
examples of code that use the SocketWrench OCX (and some of whose
code is part of this program).  Also, much thanks to Catalyst
Development, for providing the freeware SocketWrench OCX.

Note that if you need to compile the source code instead of using
the EXE file as is, make sure to make it a 32-bit project.

Support for this program only provided via e-mail to jray@aug.com.

Jerry P. Ray
Computer Discount Center
Home of The Computer Doctors
E-mail:  jray@aug.com
