c++ - Environment variables are different for dll than exe -


i'm debugging 64-bit application c# exe using native c++ dll, on windows 7. seems environment variables different these two, though both executing in same process. how possible calling system.environment.setenvironmentvariable has no effect on values returned getenv()?

the environment variables blob of data gets passed windows process when starts. runtime functions using (the bcl system.environment , crt getenv) making copies of environment during startup, means not operating on same "environment" variables.

conceptually must because otherwise there need way synchronize them accessing environment.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -