From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Updating the program caller's environment from the called program Date: 19 Jul 2000 13:25:12 GMT Organization: Aachen University of Technology (RWTH) Lines: 21 Message-ID: <8l4a7o$rpc$1@nets3.rz.RWTH-Aachen.DE> References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 964013112 28460 137.226.32.75 (19 Jul 2000 13:25:12 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 19 Jul 2000 13:25:12 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com west.usenetserver.com wrote: > So the problem is currently I have not figured out how to update the > caller's environment. Within the limits of 'documented' DOS services, you can't do that. You have to do some dirty undocumented tricks to walk the chain of memory blocks managed by DOS, and find the environment of the calling program. One big problem with this is that this environment block will often not have enough 'slack' space to store big changes in, i.e. you'll likely end up with 'out of environments space' situations. Your current trick of using a batch file only works if the calling program is command.com. You can't use the same trick to update another program's environment. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.