Yes, you can dynamically add APs to the DCT, as in the following code in SDK\libraries\utilities\command_console\wifi\command_console_wifi.c.
You can test this by building and downloading test.console to your WICED board. Type in help in the terminal and it will give you a list of commands. The "join" command will let you type in the AP SSID, password, security type and it will store the info into the DCT.
To store multiple AP information you will have to extend the DCT either statically or store the AP information in the application section of the DCT. Then you could use your application to read this information and join the specific AP of your choice.
I hope this helps.
/* Read config */
wiced_dct_read_lock( (void**) &dct_wifi_config, WICED_TRUE, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) );
/* Modify config */
dct_wifi_config->stored_ap_list.details.SSID.length = strlen( ssid );
strncpy((char*)dct_wifi_config->stored_ap_list.details.SSID.value, ssid, MAX_SSID_LEN);
dct_wifi_config->stored_ap_list.details.security = auth_type;
if ( ( auth_type & ENTERPRISE_ENABLED ) == 0 )
/* Save credentials for non-enterprise AP */
memcpy((char*)dct_wifi_config->stored_ap_list.security_key, (char*)key, MAX_PASSPHRASE_LEN);
dct_wifi_config->stored_ap_list.security_key_length = key_length;
/* Write config */
wiced_dct_write( (const void*) dct_wifi_config, DCT_WIFI_CONFIG_SECTION, 0, sizeof(platform_dct_wifi_config_t) );
I ended up choosing to store the info in the application DCT area using DEFINE_APP_DCT and manage it myself, perhaps I'll change to this approach later.