Group: Registry - Library: shlwapi
Enumerating the subkeys for a given registry key
DWORD SHEnumKeyEx(
HKEY hkey,
DWORD dwIndex,
LPTSTR pszName,
LPDWORD pcchName
);
DECLARE INTEGER SHEnumKeyEx IN shlwapi;
INTEGER hkey,;
INTEGER dwIndex,;
STRING @ pszName,;
INTEGER @ pcchName
hkey Handle to the currently open key, or a predefined value.
dwIndex Index of the subkey to retrieve. This parameter should be zero for the first call and incremented for subsequent calls.
pszName Address of a character buffer that receives the enumerated key name.
pcchName Address of a DWORD that, on entry, contains the size of the buffer at pszName. On exit, this contains the number of characters that were copied to pszName.
Returns 0 (ERROR_SUCCESS) if successful, or a nonzero error code otherwise.