Call this method to enumerate the subkeys of the open registry key.
LONG EnumKey( DWORD iIndex, LPTSTR pszName, LPDWORD pnNameLength, FILETIME* pftLastWriteTime = NULL ) throw( );
- The subkey index. This parameter should be zero for the first call and then incremented for subsequent calls
- Pointer to a buffer that receives the name of the subkey, including the terminating null character. Only the name of the subkey is copied to the buffer, not the full key hierarchy.
- Pointer to a variable that specifies the size, in TCHARs, of the buffer specified by the pszName parameter. This size should include the terminating null character. When the method returns, the variable pointed to by pnNameLength contains the number of characters stored in the buffer. The count returned does not include the terminating null character.
- Pointer to a variable that receives the time the enumerated subkey was last written to.
If the method succeeds, the return value is ERROR_SUCCESS. If the method fails, the return value is a nonzero error code defined in WINERROR.H.
To enumerate the subkeys, call CRegKey::EnumKey with an index of zero. Increment the index value and repeat until the method returns ERROR_NO_MORE_ITEMS. For more information, see RegEnumKeyEx in the Platform SDK.