Sender: bb AT ife DOT ee DOT ethz DOT ch Message-ID: <334A793E.69D0@ife.ee.ethz.ch> Date: Tue, 08 Apr 1997 18:58:38 +0200 From: Bernhard Baeumle Organization: Electronics Lab MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Desperately need help with "fopen" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello DJ, I looked thru the mail-archives and tried it on the newsgroup but nobody could help.... fopen("test.txt", "r") returns NULL as long as I have this file ("test.txt") opened with MS Word for Windows. Other programs (emacs, editor, notepad and DOS' type) have no problem reading the file!!! As soon as I close the file (it's no longer opened with Word) then fopen("test.txt", "r") works fine! It seems there is some file-locking (sharing) mechanism with Win95 but shouldn't it be possible to open the file for reading????????? BTW: - I use djgpp-v2 and run it in a DOS-box under Windows95. - I use emacs and have no such problems, but some people that use my program would like to write the input-files (script-files) with Word ;-( Some users (beginners) need to play around with my program which means that they'd like to write e.g. 5 characters / save the file / run my program and then make the next changes to the file. Just imagine the amount of time it takes to CLOSE and then RE-OPEN the file with Word, and they also need to find the correct line again... I'D REALLY APRECHIATE VERY MUCH IF YOU COULD HELP ME!!!!! Beni. +-----------------------------------+-------------------------------+ | Bernhard Baeumle | | | Swiss Federal Inst. of Technology | Phone: (+41) 1 632 51 53 | | Electronics Lab, ETZ H60.1 | FAX : (+41) 1 632 12 10 | | Gloriastr. 35 | Email: bb AT ife DOT ee DOT ethz DOT ch | | 8092 Zuerich (SWITZERLAND) | http://www.ife.ee.ethz.ch/~bb | +-----------------------------------+-------------------------------+