Registry::EnumKey

Description

Gets the sub-keys of a specified key.

Syntax

int EnumKey( StringArray & keys, LPCSTR lpKey )

Parameters

keys
[output] On return, contains the sub-keys of the given key
lpKey
[input] the key whose sub-keys are sought

Return

returns the number of sub-key. Returns 0 if error due to bad key or parent.

Examples

EX1

void Registry_EnumKey_ex1()
{
    Registry myRegAccess(HKEY_CLASSES_ROOT);
    if( myRegAccess.HasKey("device") )
    {
        StringArray saKeys;
        myRegAccess.EnumKey(saKeys, "device")
    }
}

Remark

See Also

header to Include

origin.h