Returns the directory name for an object denoted by a connection handle and an object ID.
#include <nwnet.h> or #include <nwdsdsa.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSMapIDToName ( NWDSContextHandle context, NWCONN_HANDLE connHandle, nuint32 objectID, pnstr8 object);
uses netwin32 Function NWDSMapIDToName (context : NWDSContextHandle; connHandle : NWCONN_HANDLE; objectID : nuint32; objectName : pnstr8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Specifies the connection handle for the target server.
(IN) Specifies the object ID.
(OUT) Points to the object’s distinguished name.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
The connHandle parameter contains a server connection handle. This identifies the server from which the object ID was obtained.
The objectID parameter contains the object ID returned by the specified server.
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 an eDirectory object. (If an application needs a short-hand representation of an object, it should manage its own local name-to-ID mapping.)
The object parameter receives the name of the eDirectory 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 Unicode characters (Unicode characters are always 16 bits). One character is used for NULL termination.