#include <nwnet.h> or #include <nwdsdsa.h>NWDSCCODE N_API NWDSMapNameToID (NWDSContextHandle context, NWCONN_HANDLE conn, pnstr8 object, pnuint32 objectID);
The returned ID can be used as input to older routines which require an objectID (for example, NWAddTrustee).
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.)
conn contains a server connection handle. It identifies the server from which the object ID is to be obtained.
object points to the name of the Directory object for which the ID is to be returned.
It is not necessary for the object to be defined in a partition replica stored on the target server. If the object is not stored on the server, the server generates a temporary reference to the object and returns the ID for reference to the client.
objectID points to the object ID of the specified name on the server identified by conn.
Directory