Hi All,
The company I work for has been running my Turbo Pascal
programs for about 8 years. We started with 1 PC, then went
to a DOS based LAN, then Windows For Workgroups with no
serious problems turning up. Now we must upgrade(?) to Win98
because todays machines just won't work right with WFW.
The first problem had nothing to do with Pascal but some
people may find this useful anyway. There are 2 versions of
WFW. The upgrade version is called WFW 3.1 and the
non-upgrade version is WFW 3.11. Only the latter can be made
to communicate with Win9x. If you need it, go to Microsoft's
site and download the TCP/IP driver and install it. (You'll
find a great setup guide at
http://www.nine3d.com/guides/lan/lan1.html)
The second problem had me seriously concerned. With the
old LAN, if you want to access files from your system (the
Client) on another system (the Host) you map the connection
to an available drive letter on the Client and then access
the files just as if they were local. When you run a
program, it "knows" where it is and has normal access to all
of its files.
If the Client is running Win9x you no longer map drive
letters. A Symbol is created which points to the location of
the files on the Host system. (The Host may be running WFW
or Win9x.) Windows programs (such as you might develop with
Delphi) will have access to the Symbol and know how to
access the files they need. DOS programs don't have access
to this information and when I first tried to run programs
that used data files, I got "File Not Found" error messages.
The key to making your DOS programs work is to pass them
the Path to their files. First you create a Shortcut to the
program you want to run. Open the Edit Properties box and
click on the Shortcut Tab. You will see the name of the
program, along with its symbolic path, in the field labeled
Target. The next field, Start In, is where this symbolic
Path is listed for the benefit of Win9x programs. (Don't
remove this information.) Typically it might look like this:
\\NodeName\FolderName\
Copy this info and past it after the program name in the
Target field so you wind up with something like this:
\\NodeName\FolderName\MyProg.exe \\NodeName\FolderName\
Have your program read Paramstr(1) and save it as Path in a
String var. When you want to access a file, use something
like this:
Filename := Path + ProgramName ;
assign(MyFile,Filename) ;
By the way - I found that I could install TP7.0 on the Win98
system, run it in a full screen DOS Box (do NOT drop out of
Win9x), and run in debug mode just as I did before and watch
my programs access files on other Nodes on the LAN.
Well, that's enough rambling for one night. I just hope
someone finds this useful.
Val M.