问题描述
大家好,
我的英语不好.
我有两个应用程序A和B.应用程序A设置了一个环境变量,而应用程序B可以更改此变量.我想知道App-A是否有可能监视环境变量的变化.我一直在寻找FileSystemWatcher之类的东西,只是我想监视环境变量而不是文件系统.而且我想避免在App-A中有一个工作线程定期轮询该值以查找更改.
set and echo此处提供更多信息: http://en.wikipedia.org /wiki/Environment_variable 或> WinAPI http://msdn.microsoft.com/en-us/library/ms683188( VS.85).aspx 并添加计时器进行检查! (也许可以为您提供帮助)
Hello everybody,
My English isn''t good.
I have two apps A and B. App-A sets an environment variable, and App-B can potentially change this variable. I was wondering if it''s possible for App-A to watch for changes to the environment variable. I was looking for something like the FileSystemWatcher except that I want to monitor environment variables rather than the file system. And I want to avoid having a worker thread in App-A that periodically polls the value to look for changes.
这篇关于监视对环境变量的更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!