[comp.os.msdos.programmer] DESQview, MS-Dos, Teleconference

Russell_Mennie@resbbs.UUCP (Russell Mennie) (06/26/91)

I'm currently writing a Teleconference program for the IBM.  It's
settup to use the DESQview routines as stated in the back of the manual. 
However, I'm having trouble with one thing..  How do you "share memory"
within Turbo Pascal 6.0?  This is what i'm trying to do:

type
    Teleconrec = record
        Name,
        Psuedo   :String[40];
        Security :Word;
        City     :String[30];
    End;        
 
ok... you get the point.. this is just in general... now:  one of these
records is kept for each user online, and in the teleconference..  I could
easily hook this up to a binary file, and read it as "File of Teleconrec"..
and everything would work fine.. however, all that disk access would slow
things down considerably, considering the chain would have to be check on
every sentence the user sent out..
 
Normally.. under a single task.. i could simply put this into memory,
and have it something like this:
 
type
    TelecPtr = ^TelecOnREc;
    TelecOnRec = Record
        Name,
        Psuedo   :String[40];
        Security :Word;
        City     :String[30];
        NextUser :TelecPtr;
    End;
 
and it would work fine.. but because DESQview and QEMM386.SYS is handling
the memory, there is seperate memory for each partition/window that DESQview
is running.. so it's not the same memory.......  any suggestions?
 
 
--  Notation:
 - I'm writing this Teleconference to be used with REMOTE ACCESS 1.01,
 - MS-DOS 3.30+ (i'm using 5.0)
 - DESQview 2.32
 - an IBM 486-25 with 8 megs Memory installed
 - 4 lines running off of 2400bps Smart Modems
 
so if there is any way in which i can handle this properly, by avoiding
the use of that swap/dummy file.. please let me know, as your input
would be greatly appreciated..

pshuang@athena.mit.edu (Ping-Shun Huang) (06/30/91)

In article <Russell_Mennie.3504@resbbs.UUCP> Russell_Mennie@resbbs.UUCP (Russell Mennie) writes:

 > It's settup to use the DESQview routines as stated in the back of the
 > manual.  However, I'm having trouble with one thing..  How do you "share
 > memory" within Turbo Pascal 6.0?

You may want to look more closely at the special Desqview routines which
permit tasks to communicate with one another.  Shared memory is a
reasonably common way for different tasks running under a multitasking
scheduler such as Desqview to share information, but you would have to
ask the operating system for a block of shared memory -- the same
variables do not by default and *SHOULD* not share the same memory.

Another solution, which might work better than simply sharing a big
block of memory (for one thing, shared memory may cause problems where
two processes interrupt each others updating of the area and as a result
leaves garbage in memory; for another, I'm not sure that it would be
easy to force Turbo Pascal's heap manager to allocate from this specific
block of memory) might be to write a completely separate application
whose only purpose is to keep track of the users who are currently in
teleconference which would tell the actual programs what they wanted to
know when they ask it.

--
Above text where applicable is (c) Copyleft 1991, all rights deserved by:
UNIX:/etc/ping instantiated (Ping Huang) [INTERNET: pshuang@athena.mit.edu]