RegEnumValue hide Registry value

Jun 2, 2014 at 2:03 AM
Edited Jun 2, 2014 at 2:04 AM
I have a hook that works...But I can't return even the hook. Registry pops messagebox's..error reading value content.

static uint RegEnumValue_Hooked(IntPtr hKey,
          uint dwIndex,
          StringBuilder lpValueName,
          ref uint lpcValueName,
          IntPtr lpReserved,
          IntPtr lpType,
          IntPtr lpData,
          IntPtr lpcbData)
    {
      //Don't change anything..just try to return it...Same thing if I just return the hooked values without re-calling
        uint lRet = RegEnumValue(hKey, dwIndex, lpValueName, ref lpcValueName, lpReserved, lpType, lpData, lpcbData);
            return lRet;
    }