delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/27/20:23:33

From: leva AT hotmail DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: interprocess synchronization and "Sharing violation"
Date: Wed, 27 Jan 1999 17:19:57 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 39
Message-ID: <78nhri$90u$1@nnrp1.dejanews.com>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 990124105832 DOT 4501P-100000 AT is>
NNTP-Posting-Host: 195.208.33.83
X-Article-Creation-Date: Wed Jan 27 17:19:57 1999 GMT
X-Http-User-Agent: Mozilla/4.01 [en] (Win16; I)
X-Http-Proxy: 1.0 cc3.kapitza.ras.ru:3128 (Squid/1.1.21), 1.0 x12.dejanews.com:80 (Squid/1.1.22) for client 195.208.33.82, 195.208.33.83
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dear Eli!

In article <Pine DOT SUN DOT 3 DOT 91 DOT 990124105832 DOT 4501P-100000 AT is>,
  djgpp AT delorie DOT com wrote:

> > under Windows 95. Unfortunately this approach fails on Windows 3.11. Windows
> > complain about Sharing Violation :-(. Perhaps somebody can suggest something
> > here?
> You could try calling DOS function 6Ch directly (rather than `open' or
> `_open') and use the different sharing bits defined for that
> function.  Since it is easy to find out what version of Windows you
> are running on, there should be no problem to have your program behave
> differently on each version of Windows, should that be necessary.
Well, I'm currently trying to do it. No success so far, though. Unfortunately
I have no Win3.1 installation at home so development/target environments are
spatially distant :-(. BTW, it seems (what I found while reading library
sources) that there's no need in direct int21 calls - one can specify share
flags in the static variable (something like __SHARE... - I don't remember
exactly).

> > 1. Is there any way to make windows 3.11 return with error rather than pop a
> >      messagebox to user?
> Keep dreaming...
I do.

> > 2. Is there any way to synchronize processes without relying on the file
> >      system?
> I cannot think of anything else, as far as DJGPP programs are concerned.
The idea was to create a free program that anyone can modify. That's why DJGPP
was used. I'm not aware of other free C-compilers whose output can be executed
under Win3.1. To say truth, I even don't know if Win3.1 supplies its own (not
DOS) applications some synchronization primitives.

Well, anyway, thank you for your reply.

-Leva.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

- Raw text -


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