#include <nwnet.h> or #include <nwdsdc.h>NWDSContextHandle N_API NWDSDuplicateContext (NWDSContextHandle oldContext);
If successful, NWDSDuplicateContext returns a value identifying the created Directory context. The newly created context will have a copy of the contents of the Directory context specified by oldContext. If oldContext does not reference a valid Directory context, the new context will be initialized with default values as in NWDSCreateContext.
The advantage in calling NWDSDuplicateContext is that it copies the context settings of the existing context. If you are using context settings that are not the default, NWDSDuplicateContext lets you avoid making some additional calls to modify the default context settings.
Directory