Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!uunet!mcvax!unido!sbsvax!fs-info From: fs-info@sbsvax.UUCP (Fachschaft Mathe/Info) Newsgroups: comp.sys.ibm.pc Subject: Re: Environment Size Summary: yet another ideaa Keywords: environment config shell Message-ID: <721@sbsvax.UUCP> Date: 14 Apr 89 13:45:05 GMT References: <9195@watcgl.waterloo.edu> <11966@paris.ics.uci.edu> Distribution: comp Organization: Universitaet des Saarlandes, Saarbruecken, W-Germany Lines: 43 In article <11966@paris.ics.uci.edu>, asickels@bonnie.ics.uci.edu (Alan Sickels) writes: > [...] > SHELL = C:\COMMAND.COM /E:xxxx /P > [...] > BTW this info sould be documented (read it's in the > manual if you have it). > Alan Sickels Well, there are manuals and manuals :-) Ignoring this one (works fine, but the original question was how to change the environment size of the currently running COMMAND.COM), I got a small idea. Can't prove it but i'll tell you : The Environment is accessed (as far as I know) through a pointer in a program's PSP. Now assume that the current process, called by COMMAND.COM, may get it's fathers PSP (think this my be a DOS call). Then it could determine the old size of the parent's environment, allocate a new environ- met through DOS, copy the parent's to this new (and bigger) one, setting the pointers and sizes of the prents PSP according to the new Block and, this comes to my mind now, changing the OWNER of the newly allocated environment to it's parent (else, the block will be deallocated when the size-changer finishes ) (this mut be done by hangling (is this correct english?) through DOS's memory-chain. The process MUST do all this heavy stuff with it's parents PSP because the own environment is a COPY of the parent's at another memory location. BTW, as far as I know theonly support from MS-DOS U can get are the few calls mentioned above. Hope this was helpful, I unfortunately have no time this decade to try it on my own, but if you get it fixed, please send me the sources. Greetings from Germany Brian o'Fish /* * Brian o'Fish * c/o Patrick Schaaf * Alter Stadtweg 69 * D-6602 Dudweiler/Saar * GERMANY * * X.400: fs-info@sbsvax.informatik.uni-saarland.dbp.de * Brian o'Fish is an unregistered trademark of my brain. Use him at your * own risk. */