First of all you are violating hooking rule 7. Please check the documentation.

Next, when someone calls RegEnumKeyEx, the parameters point to buffers which are not filled yet. They may contain random data. RegEnumKeyEx is supposed to fill the buffers with real information. So it doesn't make sense to ask "lpName" before you called RegEnumKeyWNextHook. After you called it you can check lpName and then eventually call it again to hide your key. However, this is known to make some problems, because you're "dropping" an index. Some programs may not care, but some programs may make problems. Correctly hiding a registry key is a bit harder than this.

(Finally, I hope your program is going to me legal? You must not use madCodeHook for anything illegal, also not for rootkits or anything else which might become a target of anti virus companies. Because otherwise me and my customers will run into serious trouble.)