我在CODEGURU上有人给了答复。This is an excerpt from RegNotifyChangeKeyValue documentation:"When the event is signaled, RegNotifyChangeKeyValue ends its monitoring of the key value. If you want to monitor further changes in the value of the key, call RegNotifyChangeKeyValue again".This means you should call RegNotifyChangeKeyValue <b>inside</b> the loop.Also take a look at following KB article: <A HREF="http://support.microsoft.com/support/kb/articles/Q236/5/70.ASP">http://support.microsoft.com/support/kb/articles/Q236/5/70.ASP</A>
monitoring of the key value. If you want to monitor further
changes in the value of the key, call RegNotifyChangeKeyValue
again".This means you should call RegNotifyChangeKeyValue <b>inside</b>
the loop.Also take a look at following KB article:
<A HREF="http://support.microsoft.com/support/kb/articles/Q236/5/70.ASP">http://support.microsoft.com/support/kb/articles/Q236/5/70.ASP</A>