For applications running under WOW, they can't delete a reg key under 64bit hive using RegDeleteKey. They have to use RegDeleteKeyEx.

RegDeleteKeyEx exist in advapi32.dll, only in 64bit OS.