NWDSAddObject(3nw)
NWDSAddObject --
adds a leaf object (an object having no subordinates) to the Directory tree
Synopsis
#include <nwnet.h>
or
#include <nwdsdsa.h>
NWDSCCODE N_API NWDSAddObject
(NWDSContextHandle context,
pnstr8 objectName,
pnint32 iterationHandle,
nbool8 more,
pBuf_T objectInfo);
Description
The parameters are as follows:
- context
-
(IN) Specifies the Directory context for the request.
- objectName
-
(IN) Points to the name of the object to be added.
- iterationHandle
-
(IN) Reserved; pass in NULL.
- more
-
(IN) Reserved; pass in zero.
- objectInfo
-
(IN) Points to a request buffer containing the attribute values for the new object.
Return values
- 0x0000
-
SUCCESSFUL
- Negative Value
-
Negative values indicate
errors. For errors returned by Directory Services,
see ``Directory Services OS Errors'' (-001 to -255),
``Directory Services Client Library Errors''
(-301 to -399), or ``Directory Services Agent in the Server Errors'' (-601
to -699).
- 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 Directory Services
Notices
For NWDSAddObject to succeed, the new object's immediate superior must already exist.
objectName identifies the name of the object to be added. For example,
CN=Elmer Fudd.OU=Looney Tunes.O=Acme.C=US.
The object can be an alias entry.
objectInfo points to a request buffer containing the attribute information necessary to create the
new object.
To add an object into the Directory, follow these steps:
-
Allocate memory for the request buffer by calling NWDSAllocBuf.
-
Initialize the request buffer for a DSV_ADD_ENTRY (7) operation by calling NWDSInitBuf.
-
For each attribute to be supplied for the object, first store the attribute's name in the result buffer by calling NWDSPutAttrName. Then store the associated value(s)
in the result buffer by calling NWDSPutAttrVal once for each value.
-
Create the new object by calling NWDSAddObject.
-
Free the request buffer by calling NWDSFreeBuf.
NOTE:
The name of the object is specified by objectName; it is not placed in objectInfo's buffer.
All of an object's mandatory attributes must be supplied for NWDSAddObject to succeed. For example, Object Class is a mandatory attribute for any object that is added.
This is the base class of the object.
While the Directory ensures that new objects conform to the Directory Schema, if an alias is being created for an existing object, no check is made to ensure the alias's Aliased
Object Name attribute points to a valid object. This check happens on the server when the aliased object name is translated to a local ID.
NWDSAddObject never dereferences aliases. The setting of the context flag associated with DCV_DEREF_ALIASES in the context field associated with DCK_FLAGS is ignored.
Services
Directory
NCP calls
0x2222 23 17 Get File Server Information
0x2222 23 22 Get Station's Logged Info (old)
0x2222 23 28 Get Station's Logged Info
0x2222 104 01 Ping for NDS NCP
0x2222 104 02 Send NDS Fragmented Request/Reply
References
NWDSListContainableClasses(3nw),
NWDSModifyObject(3nw),
NWDSRemoveObject(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.