Board index » delphi » Running TP Dos Programs on a Win9x Network - Long

Running TP Dos Programs on a Win9x Network - Long

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.

 

Re:Running TP Dos Programs on a Win9x Network - Long


Hi,

on Thu, 20 Jan 2000 at 06:49:24 o'clock, Valentine Mehling wrote:

Quote
> 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.

<snip>

Quote
>   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.

Maybe I don't exactly understand the situation, but you *can* map
drives or directories from other hosts on the network to drive
letters under Win32, just as you did under DOS. For example, if you
browse through your 'network neighbourhood', you should be able to
right-click on any drive or directory and select something like
'Connect network drive' (I don't have an English version of Windows
at hand) from the context menu. If desired, these connections can
automatically be established at start-up.

I don't know, though, if TP (or programs written in it) can access
these drives, but I can't see any theoretical obstacles. I think I'll
check it out when I get access to a Windows network.

Quote
>   The key to making your DOS programs work is to pass them
> the Path to their files.

<snip>

Quote
> Typically it might look like this:

>     \\NodeName\FolderName\

I didn't know that this works in the Win95 DOS box. If so, could it
also work under DOS with network support installed? You do use this
kind of path to specify network shares when you want to connect to
them, like e.g.

   net use X: \\NodeName\FolderName

 - Sebastian

--
Signature optimized for 1024x768 resolution in fullscreen mode.

Re:Running TP Dos Programs on a Win9x Network - Long


Quote
> I didn't know that this works in the Win95 DOS box. If so, could it
> also work under DOS with network support installed? You do use this
> kind of path to specify network shares when you want to connect to
> them, like e.g.

>    net use X: \\NodeName\FolderName

This is obviously choice one.

If you don't succeed in mapping, or if mapping is no longer an option
(the number of drives), you could try one of the longfilename units.
These are
based on win32 functions that also understand UNC I guess.

Re:Running TP Dos Programs on a Win9x Network - Long


Hi Sebastian,

Quote
>>> Maybe I don't exactly understand the situation, but you *can* map
>>> drives or directories from other hosts on the network to drive
>>> letters under Win32, just as you did under DOS.

I'm learning about Win98 in a really big hurry. I just upgraded at home
and my boss wants me to upgrade ALL of the systems at work. Thanks to you
I found where to map drive letters. This is going to be a really big
help.

Passing the drive letter works the same as passing the other path I was
using.
Thank you very much.

Val M.

Quote
Sebastian Koppehel wrote:
> Hi,

> on Thu, 20 Jan 2000 at 06:49:24 o'clock, Valentine Mehling wrote:

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

> <snip>

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

> Maybe I don't exactly understand the situation, but you *can* map
> drives or directories from other hosts on the network to drive
> letters under Win32, just as you did under DOS. For example, if you
> browse through your 'network neighbourhood', you should be able to
> right-click on any drive or directory and select something like
> 'Connect network drive' (I don't have an English version of Windows
> at hand) from the context menu. If desired, these connections can
> automatically be established at start-up.

> I don't know, though, if TP (or programs written in it) can access
> these drives, but I can't see any theoretical obstacles. I think I'll
> check it out when I get access to a Windows network.

> >   The key to making your DOS programs work is to pass them
> > the Path to their files.

> <snip>

> > Typically it might look like this:

> >     \\NodeName\FolderName\

> I didn't know that this works in the Win95 DOS box. If so, could it
> also work under DOS with network support installed? You do use this
> kind of path to specify network shares when you want to connect to
> them, like e.g.

>    net use X: \\NodeName\FolderName

>  - Sebastian

> --
> Signature optimized for 1024x768 resolution in fullscreen mode.

Other Threads