NWDSMapIDToName

Returns the directory name for an object denoted by a connection handle and an object ID.

Local Servers:blocking
Remote Servers:blocking
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP
Library:Cross-Platform NDS (NET*.*)
Service:NDS

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwdsdsa.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSMapIDToName  ( 
     NWDSContextHandle   context,  
     NWCONN_HANDLE       connHandle,  
     nuint32             objectID,  
     pnstr8              object); 
  

Pascal

  uses netwin32 
   
  Function NWDSMapIDToName 
    (context : NWDSContextHandle; 
     connHandle : NWCONN_HANDLE; 
     objectID : nuint32; 
     objectName : pnstr8 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

connHandle

(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 0000

SUCCESSFUL

nonzero value

Nonzero values indicate errors. See NDS Return Values (–001 to –799).

Remarks

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.

NCP Calls

See Also

NWDSMapNameToID