eDirectory context keys are used when setting and getting context handle information. They are defined in the nwdsdc.h file. Most keys can be set with bit mask flags which modify the information returned by a key. For an overview of how the keys and flags work together, see Section 1.1, Context Handles.
The functions for manipulating information about the NDS context are NWDSGetContext and NWDSSetContext. Both require a key value as a parameter, and the table below lists the defines available for the key parameter. For the default values, see Section 5.7, Default Context Key Values.
Key Name and C Value |
Data Type |
Description |
---|---|---|
DCK_FLAGS 1 |
nuint32 |
Determines how requests to eDirectory are processed and how data is returned (see Section 5.8, DCK_FLAGS Bit Values). |
DCK_CONFIDENCE 2 |
nuint32 |
Determines replica type when processing requests (see Section 5.10, DCK_CONFIDENCE Bit Values). |
DCK_NAME_CONTEXT 3 |
NULL terminated string |
Contains the current location in the eDirectory tree. For the format of the string, see the DCV_XLATE_STRINGS flag in Section 5.8, DCK_FLAGS Bit Values. |
DCK_TRANSPORT_TYPE 4 |
|
Not currently used. |
DCK_REFERRAL_SCOPE 5 |
|
Not currently used. |
DCK_LAST_CONNECTION 8 |
NWCONN_HANDLE |
Contains the connection handle of the last server to which the library sent a request. This variable is cleared when the tree name is changed. |
DCK_LAST_SERVER_ADDRESS 9 |
|
NLM only. Obsolete. Use DCK_LAST_CONNECTION instead. |
DCK_LAST_ADDRESS_USED 10 |
|
NLM only. Obsolete. Use DCK_LAST_CONNECTION instead. |
DCK_TREE_NAME 11 |
NULL terminated string |
Contains the name of the tree in the current context. This name must be the literal eDirectory tree name. DNS names or string forms of a network address are not supported. For the format of the string, see the DCV_XLATE_STRINGS flag in Section 5.8, DCK_FLAGS Bit Values. |
DCK_DSI_FLAGS 12 |
nuint32 |
Determines the eDirectory object information to be returned by the NWDSList, NWDSReadObjectDSIInfo, NWDSReadObjectInfo, and NWDSSearch functions (see Section 5.11, DCK_DSI_FLAGS Values). |
DCK_NAME_FORM 13 |
nuint32 |
Determines whether eDirectory returns distinguished names in partial dot or slash format (see Section 5.9, DCK_NAME_FORM Values). |
DCK_NAME_CACHE_DEPTH 15 |
nuint32 |
Determines how many eDirectory names are kept in the cache. When the cache is full, the oldest cache record is dropped. |
Before changing the DCK_FLAGS information, first read the current flags by calling NWDSGetContext. Use bitwise operations to change the flag(s) you want to change while leaving the settings of the other flags unchanged. Then call the NWDSSetContext function to set DCK_FLAGS to the desired settings.