Date: Tue, 15 Apr 1997 12:11:41 +0300 (IDT) From: Eli Zaretskii To: Michael Bukin cc: djgpp AT delorie DOT com Subject: Re: Desperately need help with "fopen" In-Reply-To: <33530f70.8639008@news-win.inp.nsk.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 15 Apr 1997, Michael Bukin wrote: > I have tried `fopen' on file already opened in M$Word: > > BC4.5 dos: Sharing violation. Abort, Retry, Fail? > -#- easywin (win 3.xx?): Message box with Cancel, Retry. > -#- win32 console: file opened. > GCC (DJGPP): Permission denied (EACCES) Thanks. But I wanted to ask you to change the source of `fopen' so that it tries to call `open' once in compatinility mode, and if that fails, call it again with DENYNONE bit. Can you please do that and see if that solves the problem? > BTW, is there any way to tell whether file is opened in sharing mode > or not (without opening with/without sharing)? I don't know any other way than to look at undocumented DOS structures, which will not work in Windows 95 or Windows 3.11 with 32-bit file access enabled.