enumerate_registry_keys


template <class character>
int enumerate_registry_keys(handle key,
                            unsigned index,
                            character* name,
                            unsigned* length,
                            unsigned* reserved,
                            character* key_class,
                            unsigned* class_length,
                            file_time* last_write)

This function enumerates the subkeys of a key.

Parameters

handle key

The handle of the key whose subkeys are being enumerated.

unsigned index

The index of the key to be returned. The first call to this method should specify an index of 0. Subsequent calls should increment the index by 1.

character* name

A pointer to a buffer to hold the subkey name.

unsigned* length

A pointer to a variable that initially contains the length of the buffer pointed to by the previous parameter. Upon return, the variable contains the number of characters transferred to the buffer, not including the null.

unsigned* reserved

Reserved - must be null.

character* key_class

A pointer to a buffer to hold the class (type) of the subkey. null may be specified if no class information is required.

unsigned* class_Length

A pointer to a variable that initially contains the length of the buffer pointed to by the previous parameter. If zero is specified and the previous parameter is null, no class information is returned. If a non-zero buffer length is specified and the buffer is not large enough to contain the subkey class, an error is flagged.

file_time* last_write

A pointer to a buffer to hold the time at which the subkey was most recently updated. null may be specified if the most recent update time is not required.

Return

int

0 The function succeeded.
Other The call failed - a Win32 error code is returned.

Notes

The order in which data is returned is not defined.

The access key_access::enumerate_subkeys is required for the key. The access key_access::read includes access key_access::enumerate_subkeys.