Message-Id: <1.5.4.32.19971216172602.006cc6b4@dce03.ipt.br> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 16 Dec 1997 15:26:02 -0200 To: Nate Eldredge , DongJun Kim , djgpp AT delorie DOT com From: Cesar Scarpini Rabak Subject: Re: Remaining enviroment.. Precedence: bulk At 19:49 15/12/97 -0800, Nate Eldredge wrote: >At 12:59 12/15/1997 GMT, DongJun Kim wrote: >>Hi, >> >> I want to remain my enviroment if my program terminated or not. >>I used putenv( "MYPROG=C:/LANG/MYPROG.CFG" ) in my program. >> >> But after terminated, it is not in enviroment variables. >>( I checked it by typing "SET" ) >> >> What have to I do now? >This is a shortcoming of DOS. Each program has its own local copy of the >environment, and it is generally only possible to modify your own copy. >After your program terminates, all changes are lost. >Having said that, there's a moderately well-known hack involving INT 2Eh >which does this. I don't know exactly how, but try Ralf Brown's Interrupt >List and/or some DOS hacking newsgroup. >There's a good chance it's not worth your effort; perhaps try to think of >some other method for accomplishing what you want. > This complements my earlier post. BTW, as a suggetion on implementing what Nate is saying, I think the most portable way of doing one such a thing woulbe to write a file. HTH, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cesar Scarpini Rabak E-mail: csrabak AT ipt DOT br DME/ASC Phone: 55-11-268-3522 Ext.350 IPT - Instituto de Pesquisas Tecnologicas Fax: 55-11-268-5996 Av. Prof. Almeida Prado, 532. Sao Paulo - SP 05508-901 BRAZIL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~