From: bukinm AT inp DOT nsk DOT su (Michael Bukin) Newsgroups: comp.os.msdos.djgpp Subject: Re: Desperately need help with "fopen" Date: Tue, 15 Apr 1997 06:08:58 GMT Organization: BINP SD RAS Lines: 24 Message-ID: <33530f70.8639008@news-win.inp.nsk.su> References: Reply-To: bukinm AT inp DOT nsk DOT su NNTP-Posting-Host: csd-bsdi.inp.nsk.su Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Mon, 14 Apr 1997 09:17:44 GMT, Eli Zaretskii wrote: > Based on what was said in this thread and on what I know about file > sharing on Windows 95, it seems to me that `fopen' and `open' should > first try to open the file in compatibility mode, and if that fails, > try once aagain with SH_DENYNO bit set. This should work in most > cases. Am I right? Could you please test this and post the necessary > patches to `fopen' and `open'? Thanks. 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) I don't know why it is different in DOS and win32, but maybe it's because file sharing should be present for win32 and is not required for DOS. BTW, is there any way to tell whether file is opened in sharing mode or not (without opening with/without sharing)?