Newsgroups: comp.windows.ms.programmer
Path: funic!news.funet.fi!sunic!psinntp!psinntp!rpi!usc!sol.ctr.columbia.edu!spool.mu.edu!cass.ma02.bull.com!pluto.uk03.bull.co.uk!keithb
From: keithb@hemel.bull.co.uk (Keith Bedford)
Subject: Re: How do I set env var from windows?
Message-ID: <1992Dec17.121826.15802@uk03.bull.co.uk>
Sender: @uk03.bull.co.uk
Nntp-Posting-Host: brno
Organization: Bull HN UK
References: <1992Dec14.215635.4126@e2big.mko.dec.com>
Date: Thu, 17 Dec 92 12:18:26 GMT
Lines: 21

guros@soju.enet.dec.com () writes:


>Does anyone know of a routine to set an Environmental variable in the MS-DOS master Environmental variable table from a MS-Windows program?

>Any help would be most appreciated.

I don't think you can, windows programs get the DOS environment as it was when
Windows loaded. The 'standard' putenv is supplied but has no effect. But try
it, I might be wrong.

When building DLL's putenv is NOT supplied. I have ported a large chunk of
Unix code to a DLL that used putenv. I provided my own putenv that built a
linked list of environment variables. The standard getenv was also replaced 
with a version that searched the local environment, then searched the Windows
environment.

==============================================================================
  Keith Bedford				keith.bedford@uk03.bull.co.uk
  England			
==============================================================================
