NWDSMapIDToName(3nw)


NWDSMapIDToName -- returns the directory name for an object denoted by a connection handle and an object ID

Synopsis

   #include <nwnet.h> 
   or 
   #include <nwdsdsa.h> 
   

NWDSCCODE N_API NWDSMapIDToName (NWDSContextHandle context, NWCONN_HANDLE conn, nuint32 objectID, pnstr8 object);

Description

The parameters are as follows:

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

conn
(IN) Specifies the connection handle for the target server.

objectID
(IN) Specifies the object ID.

object
(OUT) Points to the object's distinguished name.

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

conn contains a server connection handle. This identifies the server from which the object ID was obtained.

objectID contains the object ID returned by the specified server.

object receives the name of the Directory object corresponding to the given object ID. The caller must allocate memory to hold the object's name. The size of the memory allocated is (MAX_DN_CHARS+1)*sizeof(character size), where character size is 1 for single-byte characters and 2 for double-byte characters (Unicode is double byte). One character is used for NULL termination.

Since object IDs are unique only in relation to a particular server, the use of object IDs is restricted to the server from which they originate. An object ID returned by one server is meaningless to another server. Furthermore, a returned object ID may be valid only for a short period of time.

For these reasons, applications should not store object IDs locally. Rather, they should store the full name of a Directory object. (If an application needs a short-hand representation of an object, it should manage its own local name-to-ID mapping.)

Services

Directory

NCP calls

0x2222 104 02
Send NDS Fragmented Request/Reply

References

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