#include <nwnet.h> or #include <nwdsdsa.h>NWDSCCODE N_API NWDSMapIDToName (NWDSContextHandle context, NWCONN_HANDLE conn, nuint32 objectID, pnstr8 object);
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.)
Directory