NWDSGetDefNameContext(3nw)


NWDSGetDefNameContext -- retrieves the default name context for a specified tree

Synopsis

   #include <nwdsconn.h> 
   

N_EXTERN_LIBRARY (NWDSCCODE) NWDSGetDefNameContext (NWDSContextHandle context, nuint nameContextLen pnstr8 nameContext);

Description

The parameters are as follows:

context
(IN) Specifies the Directory context for the request.

nameContextLen
(IN) Specifies the length (in bytes) of the nameContextbuffer.

nameContext
(OUT) Points to the buffer to place the default name context value.

Return values

0x0000
SUCCESSFUL

Negative Value
Negative values indicate errors. For errors returned by Directory Services, see ``Directory Services OS Errors'' (-001 to -255), ``Directory Services Client Library Errors'' (-301 to -399), or ``Directory Services Agent in the Server Errors'' (-601 to -699).

Notices

This function gets the default name context for the tree specified in the context (or if the tree name isn't set, the preferred tree name). This call differs from NWGetDefaultNameContextin that this call has an added parameter, context, and operates on a per tree basis. Also, this function call can return the name context in Unicode while NWGetDefaultNameContextcould only return the data in local code page format.

The default name context for the preferred tree can be set by the DEFAULT NAME CONTEXT configuration parameter, or by calling either NWSetDefaultNameContext or NWDSSetDefNameContext. The default name context for another tree (different from the preferred tree) can be set by calling NWDSSetDefNameContext.

The default name context can be from 0 to 257 bytes long for local code page strings (including the NULL), or 0 to 514 bytes long for Unicode strings (including the 2 bytes for NULL). If the nameContext buffer is too small to contain the value, an error is returned and no data is copied.

If the underlying requester does not support multiple NDS trees, the default name context for the default tree will be returned (that is, the tree name specified in the context will be ignored).

Services

Directory

NCP calls

None

References

NWGetDefaultNameContext(3nw), NWSetDefaultNameContext(3nw), NWDSSetDefNameContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.