The very nature of environment variables is that they "belong" to a process. If you change them in one process, they won't change in the others. You should consider other methods of interprocess comunication. Perhaps a temporary file could be enough for your needs?
Comment on Re: working with enivornment variables in win32
yea I thought I'd try with the environment variables since I didn't really want the overhead of opening and closing the file every 5 secs.
I thought about forking and using semaphores but didn't want to make the code too complex either.