Restores an object’s attribute names and values that were saved by calling NWDSBackupObject.
#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);
uses netwin32 Function NWDSRestoreObject (context : NWDSContextHandle; objectName : pnstr8; iterationHandle : pnint_ptr; more : nbool8; size : nuint32; objectInfo : pnuint8 ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the object name for which information is to be returned.
(IN) Points to value that eDirectory uses internally when repeative calls must be made to restore an object. Initialize to -1.
(IN) Specifies a partial message.
(IN) Specifies the length of the information to be restored.
(IN) Points to the starting location of the information to be restored.
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 |
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.