Article View: comp.sys.ibm.pc.programmer
Article #1552Trouble with MSC, FileIO, & 10Net (whew!)
From: R. Scott Youmans
Date: Tue, 13 Mar 1990 01:11
Date: Tue, 13 Mar 1990 01:11
47 lines
2612 bytes
2612 bytes
I am using 2 386 IBM-PC clones with DOS 3.3, 10NET Lan software,
Metawindows & Island Graphics software and Microsoft C5.1 ... and I
have a problem. The overview of the task is simple: pressing a key on
PC-A pulls up a graphics screen on both PC-A and PC-B. PC-B should not
display its screen until it receives a signal from A. This is done for
20 screens.
To do this quickly, I decided to use a shared file ovcer the network.
PC-A creates it whenever a key is pressed. PC-B loops on fopen()!=NULL
until the file exists. Then it closes the file, deletes it, and
displays its image. So, what`s the problem?
PC-A runs fine all the way through. PC-B only runs through about half (13)
of the screens! Here is the main loop on PC-B:
while (!kbhit() && current < 19) {
if (next = fopen (SYNC, "r") != NULL) {
fclose(next);
readstatus = ReadPaint (image_list[current++], thePort);
remove (SYNC);
}
}
So, while it is not interrupted with a keypress, or current is < 19, it checks
for the existance of the SYNC file. If present, it closes it, read in the image
and removes the file.
I have tracked down the problen to the fopen in ReadPaint. It is unable to
open the file even though it is in the current directory. Then, on subsequent
attempts the fopen(SYNC) command fails, even though the file is present. It is
as if I ran out of files to open, or some buffer got screwed.
Oh, in config.sys, files=40 buffers=20.
If one of you recognises the problem, or wishes to help, I would like
your assistance. I've put too many hours on this already.
Also, if you know of an alternative (Interprocess Communication or other)
on 10Net or with shared files, please speak up!
This is my first big experience with MSC and DOS (from a UNIX environment),
so don't hesitate to state the obvious.
Much thanks, (the weary...)
Scott Youmans....................................youmans@cs.odu.edu
Computer Science
Old Dominion University..............................Save The Earth
Technical Details
Message-ID:
<11776@xanth.cs.odu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!xanth!cs.odu.edu!youmansShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!xanth!cs.odu.edu!youmans From: youmans@cs.odu.edu (R. Scott Youmans) Newsgroups: comp.sys.ibm.pc.programmer,comp.protocols.pcnet Subject: Trouble with MSC, FileIO, & 10Net (whew!) Keywords: 10Net Microsoft C5.0 IPC Shared Files Message-ID: <11776@xanth.cs.odu.edu> Date: 13 Mar 90 01:11:02 GMT Sender: news@cs.odu.edu Followup-To: comp.sys.ibm.pc.programmer Distribution: usa Organization: Old Dominion University, Norfolk, VA Lines: 47