[comp.windows.ms] File locking problem

Francisco A. Camargo (Kiko) <camargo@cs.columbia.edu> (04/04/91)

Hi there,

Well, after 3 months of honneymoon with the acclaimed Windows 3.0,
I start to find the first problems: some (DOS) applications seem not to be
releasing whatever "locks" they get when files are open. For instance, I
may load STATGRAF and import a .WK3 file generated by LOTUS 123 v3.1.
I then exit STATGRAF and go back to 123, but if I try to load ANY .WK3
file, I'll get a message stating that the file is reserved by some other
application (a 123 message), despite the fact that the STATGRAF session had 
completely terminated. Well, my first tests indicated that this was due
some problem with STATGRAF, and the only way to solve it was to exit Windows,
reboot, and start it over. However...

I was living with that, until today when I found out that another program 
that I wrote myself (very straightforward C program, compiled with MSC 5.1, 
that reads one file and writes another one, closing all of them upon exit), 
would cause the same problems, i.e., leave some of the files in the directory 
locked, and unaccessible to other applications. In fact, if I try to run 
the same program again, it simply hangs, forcing me to terminate it, and 
restart windows altogether. I really don't know what's going on, but any help 
is really appreciated.

My environment is a no-name 80386/33Mhz clone, with a PCC motherboard and AMI
BIOS, 8Mb RAM, IDE hard-disks (one Conner w/200Mb divided in two logical 
partitions (C: and E:) of 150Mb and 50Mb respectively, and one Conner w/40Mb 
making up for the drive D:), VGA board in standard hi-res 640x480 (or 350??) 
mode, Hayes Modem in COM1:, Microsoft Mouse in COM2:, COM3 & COM4 idle, and
a HP LaserJet III hooked to LPT1:, with LPT2: idle. Also, I run DOS 4.1 with 
BUFFERS=29,8 /X, and load QEMM v5.11, which allows me to load in high memory 
the following programs: 
  MOUSE.SYS, VDISK.SYS (1Mb), SHARE.EXE, FILES.COM (=45),
  FCBS.COM (=45,45), LASTDRIV.COM (=Z), PUSHDIR, SMARTDRV.SYS (1024 512), 
  VIDRAM.COM, MODE.COM (LPT1:,,P), and PRINT (/d:lpt1 /b:16384 /q:32).

Finally, I created a permanent swap file with 16Mb, and I'm able to run 
Windows in enhanced mode with a total of 21Mb of free memory, and still
get more than 578Kb free in a DOS session.

All of the above programs are called trough .PIF files, with nothing much
different than the _DEFAULT.PIF file (I changed only things like fullscreen,
and amount of EMS memory).

My only hunch is the fact that I use "SUBST" for some directories that
I include in my PATH, and, due to space problems, I had to have them 
assigned to drive letters (note that "lastdriv" is Z:). But other than that,
most applications run just fine, and I have had no other problems with this
new environment. Note however, that the above programs are refered to by their
full path name, without any mention to the "SUBSTed" drive letters.  Another 
possibility is SHARE.EXE, but I'm affraid of removing it for I don't know 
what would be the impact on Windows 3.0.

Lastly, due to the enourmous amount of messages in this news group, I'm not
able to read all of them. Please, send you guesses directly to me. I'll 
summarize the answers of general interest, and I'll post them back in the
net.

In any event, my apologies for this long message  (as usual, too late),
and many thanks to all who sympathize. 


/Kiko
 camargo@cs.columbia.edu