RegEnumKeyEx and RegDeleteKeyEx, Or: Why reading all the documentation for a function is a good idea
RegEnumKeyEx seems simple enough. Open the parent key, call RegEnumKeyEx specifying dwIndex=0, then increment dwIndex and call RegEnumKeyEx until you get ERROR_NO_MORE_ITEMS. There are, however, two caveats in the documentation that are easy to overlook.
Read more