delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/06/06:37:37

Date: Sun, 6 Apr 1997 13:15:33 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Robert Hoehne <Robert DOT Hoehne AT Mathematik DOT tu-chemnitz DOT de>
cc: djgpp AT delorie DOT com
Subject: Re: HELP: cannot read file while opened in word!?!
In-Reply-To: <3344BC20.56EC@Mathematik.tu-chemnitz.de>
Message-ID: <Pine.SUN.3.91.970406131454.2353E-100000@is>
MIME-Version: 1.0

On Fri, 4 Apr 1997, Robert Hoehne wrote:

> At first it is required, that Word uses the file
> with the correct sharing flags set. (under W95
> you don't need to load share.exe). And from the
> DJGPP program (your program) you have to open the
> file with the _dos_open() (I don't know if it possible also
> with fopen) function and give there explicit the
> sharing flags for opening the file (these are
> the SH_... constants from fcntl.h). Please read
> the doc about that function for more details.

I don't understand this.  `_dos_open' doesn't do anything
significantly different from `_open' (called by `fopen'), so why
should the effect be different?  Are you sure `_open' doesn't work
also?

One thing that I would suggest is trying to set the DENYNONE bit in
the access/sharing mode byte.  That might allow some access to the
file.  Of course, if Word opens the file so that nobody else can
access it, nothing will work.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019