Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » SetEnv()
Re: SetEnv() [message #37253 is a reply to message #37251] Wed, 12 September 2012 11:19 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3361
Registered: August 2008
Senior Veteran
Hello Mirek

Now I understand. U++ programs read environment vars at the beginning in AppInitEnvironment__() and put a copy of them in EnvMap().

This way a SetEnv() function should update EnvMap(). For example:

bool SetEnv(const char *id, const char *val) 
{
	EnvMap().Put(WString(id), WString(val));
#ifdef PLATFORM_POSIX
	return setenv(id, val, 1) == 0;
#else
	return _wputenv(WString(id) + "=" + WString(val)) == 0;
#endif
}


However EnvMap() is not public.


Best regards
IƱaki

[Updated on: Wed, 12 September 2012 11:23]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: build Core to static library problem:Value.cpp | 168 | note:type was declared here
Next Topic: LocalProcess to read from stderr
Goto Forum:
  


Current Time: Thu May 16 23:08:43 CEST 2024

Total time taken to generate the page: 0.02467 seconds