NWDSRestoreObject

Restores an object’s attribute names and values that were saved by calling NWDSBackupObject.

Local Servers:blocking
Remote Servers:blocking
NetWare Server:3.11, 3.12, 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> 
   
  NN_EXTERN_LIBRARY (NWDSCCODE)  NWDSRestoreObject  ( 
     NWDSContextHandle   context,  
     pnstr8              objectName,  
     pnint_ptr           iterationHandle,  
     nbool8              more,  
     nuint32             size,  
     pnuint8             objectInfo); 
  

Pascal

  uses netwin32 
   
  Function NWDSRestoreObject 
    (context : NWDSContextHandle; 
     objectName : pnstr8; 
     iterationHandle : pnint_ptr; 
     more : nbool8; 
     size : nuint32; 
     objectInfo : pnuint8 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

objectName

(IN) Points to the object name for which information is to be returned.

iterationHandle

(IN) Points to value that eDirectory uses internally when repeative calls must be made to restore an object. Initialize to -1.

more

(IN) Specifies a partial message.

size

(IN) Specifies the length of the information to be restored.

objectInfo

(IN) Points to the starting location of the information to be restored.

Return Values

These are common return values.

0x0000 0000

SUCCESSFUL

0x8996

SERVER_OUT_OF_MEMORY

0x89E2

TOO_FEW_FRAGMENTS

0x89E3

TOO_MANY_FRAGMENTS

0x89E4

PROTOCOL_VIOLATION

0x89E5

SIZE_LIMIT_EXCEEDED

0x89FD

UNKNOWN_REQUEST

0x89FD

INVALID_PACKET_LENGTH

0x89FE

BAD_PACKET

0x89FF

Failure not related to eDirectory

nonzero value

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

Remarks

NWDSRestoreObject is used to restore the attributes and attribute values for one object at a time. To restore the entire directory, NWDSRestoreObject must be called for each object that is to be restored.

The iterationHandle parameter is used differently in this function. In other functions, the amount of data returned from the server is potentially larger than a single eDirectory message can accommodate. Here, the opposite is true. The request can be larger than the largest eDirectory message. When the more parameter is set to TRUE, the client indicates that not all of the object data is in the current request and that more data is coming. When the client sets the more parameter to FALSE, the client indicates the completion of a series of restore requests. Only on completition does eDirectory process the request.

In the initial call to NWDSRestoreObject, set the iterationHandle parameter to NO_MORE_ITERATIONS. On subsequent requests, set it to the value returned in the preceding reply.

After calling NWDSRestoreObject for the last time, and setting more to FALSE, the value pointed to by iterationHandle will be set to NO_MORE_ITERATIONS on return.

To abort the restoration of an object before sending all the information about an object, call NWDSCloseIteration with an operation type of DSV_RESTORE_ENTRY.

The size parameter specifies the length of the information pointed to by objectInfo. This is the information saved after calling NWDSBackupObject.

NCP Calls

See Also

NWDSBackupObject