- Oct
- 358
- 2
Hello – I am not sure if this “how it works”
I been using tcc plugings for a since Version 10 – An I think this is the first time this happened. In the simplest form, it seemed that fetching environment variables seem not to have the most recent value.
Here is the case. I have a plugin that runs a scripting language ... When processing one of the scripts ( NOTE: that the plugin is running in the same process as TCC) the script loads a dll.
Code in that dll then tries to read a environment variable (say the name is FOO) that was set in the script. I checked the scripting language code and it calls the windows API to set the
variable.
Now in the loaded DLL, it tried to read the just set variable and its value is empty. I could not figure this out at all. I then tried the variable PATH. By the time this script runs, PATH has been modified by TCSTART.
Now I was tracking the loaded dll when it now acceded PATH and the value reported was not the value of path when the script started but I think the value when TCSTART started at start up – Did I miss something on how environment variables are save and processed? Thanks
I been using tcc plugings for a since Version 10 – An I think this is the first time this happened. In the simplest form, it seemed that fetching environment variables seem not to have the most recent value.
Here is the case. I have a plugin that runs a scripting language ... When processing one of the scripts ( NOTE: that the plugin is running in the same process as TCC) the script loads a dll.
Code in that dll then tries to read a environment variable (say the name is FOO) that was set in the script. I checked the scripting language code and it calls the windows API to set the
variable.
Now in the loaded DLL, it tried to read the just set variable and its value is empty. I could not figure this out at all. I then tried the variable PATH. By the time this script runs, PATH has been modified by TCSTART.
Now I was tracking the loaded dll when it now acceded PATH and the value reported was not the value of path when the script started but I think the value when TCSTART started at start up – Did I miss something on how environment variables are save and processed? Thanks