www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/31/08:03:52

Date: Sun, 31 Dec 2000 14:58:10 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: Yoram Hofman <yoram AT htsol DOT com>
Message-Id: <8582-Sun31Dec2000145809+0200-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
CC: djgpp AT delorie DOT com
In-reply-to: <3A4F298B.6020906@htsol.com> (message from Yoram Hofman on Sun,
31 Dec 2000 14:41:47 +0200)
Subject: Re: Two programs shared memory
References: <3A4F298B DOT 6020906 AT htsol DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Sun, 31 Dec 2000 14:41:47 +0200
> From: Yoram Hofman <yoram AT htsol DOT com>
> 
> I need to share about 50K memory between two programs in DOS.
> Parent program calls child by spawn.
> I understood from FAQ and archives I must allocate this memory
> block in DOS memory.
> The questions are:
> 1) Which function is useful for the purpose?

__dpmi_allocate_dos_memory.

> 2) How parent process can transmit to child process pointer (selector) 
> of this memory?

One way to do that is to pass the selector to the child via the
command line arguments:

	spawnl (P_WAIT, "prog.exe", "prog.exe", "0x13f", NULL);

where 0x13f is the selector you want to pass.

- Raw text -


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