Begins access to an attribute of type SYN_STREAM.
#include <nwnet.h> or #include <nwdsdsa.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSOpenStream ( NWDSContextHandle context, pnstr8 objectName, pnstr8 attrName, nflag32 flags, NWFILE_HANDLE N_FAR *fileHandle);
uses netwin32 Function NWDSOpenStream (context : NWDSContextHandle; objectName : pnstr8; attrName : pnstr8; flags : nflag32; Var fileHandle : NWFILE_HANDLE ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Points to the name of the object having the attribute that is to be opened.
(IN) Points to the attribute name whose value is being read.
(IN) Specifies the mode in which the stream is to be opened:
(OUT) Points to the file handle appropriate for the platform from which the API is being called.
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 |
All attributes whose syntax is SYN_STREAM must be accessed by first calling NWDSOpenStream to retrieve a file handle to be used for accessing the attribute’s value. The returned handle is a file handle that is appropriate for the platform on which the application is running. This file handle can be used to access the attribute value through the platform’s standard file I/O functions.
If the attribute has never been initialized, NWDSOpenStream will return ERR_NO_SUCH_VALUE. The attribute can be initialized when the object is created ( NWDSAddObject) or afterwards with the NWDSModifyObject function. Set the attribute's value to NULL.
Close the file handle by calling the platform’s file close function.
You must use the file I/O functions that are appropriate for the platform on which the application is running. For Windows, call _lread, _lwrite, _lclose, and _llseek.
Attribute values that are of syntax SYN_STREAM are not accessed by NWDSGetAttrVal. When reading the attributes of an object that has a stream attribute (such as Login Script), NWDSGetAttrVal returns a zero-length octet string for the value of the stream attribute.
NOTE:For NLMs, if the handle returned by NWDSOpenStream is to be used by fdopen, NWDSOpenStream must be called with O_TEXT ORed in with the other values in flags.