delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/15/22:49:57

Date: Mon, 15 Dec 1997 19:49:31 -0800 (PST)
Message-Id: <199712160349.TAA17939@adit.ap.net>
Mime-Version: 1.0
To: DongJun Kim <freestar AT soback DOT kornet DOT nm DOT kr>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Remaining enviroment..

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.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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