www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/04/01:47:57

From: av568 AT rgfn DOT epcc DOT edu (Beautiful Savior Lutheran Church)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HELP: cannot read file while opened in word!?!
Date: 4 Apr 1997 01:28:24 GMT
Organization: The Rio Grande Free-Net, El Paso Community College, El Paso, TX
Lines: 31
Message-ID: <5i1lfo$m0c@news.epcc.edu>
References: <33429627 DOT 50B1 AT ife DOT ee DOT ethz DOT ch>
NNTP-Posting-Host: rgfn.epcc.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Bernhard Baeumle (bb AT ife DOT ee DOT ethz DOT ch) wrote:
> Hi folks.

> I desperately need your help!

> I have: 
> - djgpp-v2
> - running my program in a dos-box under windows95
> - I edit a file with MS-Word for Windows95, and
>   save this file again (text-only).

> ===> From my djgpp-program I cannot even open this 
> file for reading (as long as it's opened with Word).
> Note: fopen("test.txt", "r") returns NULL   !?!?!?

> Of course I heard of things like "file-locking" but at 
> least I would like to READ a file that is opened with 
> Word or any other application.

Nope. I don't know where you got this idea; if a file is open in one 
program, another program CANNOT use that file. The fault is not in Word 
or DJGPP. What actually happens is that an INT 24 is generated with the 
error of "File sharing violation," which CWSDPMI silently fails (but you're
running under Win95 so I guess it too silently fails INT 24s?)

Anyway, to answer your question: It's not possible. You must close the 
file in Word first.

--
Beautiful Savior Evangelical Lutheran Church - av568 AT rgfn DOT epcc DOT edu
We have what you need-- A Savior!

- Raw text -


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