Hi,
CfgAddEntry can be used without calling CfgRemoveEntry first. However to prevent multiple tasks and running out of resources, the Mode variable in the function call should be set to CFG_ADDMODE_UNIQUE. This option will remove any configurations with the same Tag and Item fields. When a DHCP configuration is removed, it will tell SYS/BIOS to destroy the DHCP task (will free the task stack and resources). The new configuration is added and a new DHCP task is created.
Hope this helps,
-- Emmanuel