In Windows CE: CeRegGetNotificationInfo() Doesn’t Seem to Work I discuss my trials at getting CeRegGetNotificationInfo() to work. Several people have followed up with suggestions, which I have tried without any luck.
Someone took the time to point out the flaws in my code that I had already pointed out in the first article. That was actually helpful, but didn’t get me anywhere.
A colleague of mine did some in depth investigation of the code and found some useful information:
·         As I had wondered (to myself) the registry notification functions are actually implemented the same way as the file notification functions, or to be more exact the registry notification functions are just pointers to the file notification functions.
·         There is an undocumented flag that should be passed into CeFindFirstRegChange(), it is FILE_NOTIFY_CHANGE_CEGETINFO. This flag tells the notification system that we will call CeRegGetNotificationInfo() later to get the information.
·         The return value of CeRegGetNotificationInfo() appears to be zero on success contrary to the documentation.
With that information, I tried again. And again no information is ever available. My colleague and I have a theory which is that the information is only filled in when a registry key actually changes. But there are no API functions to change a key, so it will never work.   There doesn’t seem to be any code that fills in information when a value changes.
Copyright © 2009 – Bruce Eitman
All Rights Reserved