Enumerates syntax definitions or retrieves specific eDirectory schema syntax definitions.
#include <nwnet.h> or #include <nwdsmisc.h> N_EXTERN_LIBRARY (NWDSCCODE) NWDSReadSyntaxes ( NWDSContextHandle context, nuint32 infoType, nbool8 allSyntaxes, pBuf_T syntaxNames, pnint_ptr iterationHandle, pBuf_T syntaxDefs);
uses netwin32 Function NWDSReadSyntaxes (context : NWDSContextHandle; infoType : nuint32; allSyntaxes : nbool8; syntaxNames : pBuf_T; iterationHandle : pnint_ptr; syntaxDefs : pBuf_T ) : NWDSCCODE;
(IN) Specifies the NDS context for the request.
(IN) Specifies the type of information desired: DS_SYNTAX_NAMES equals names only, and DS_SYNTAX_DEFS equals names, IDs, and matching rules.
(IN) Specifies the scope of the request: TRUE=all syntaxes and FALSE= selected syntaxes specified by syntaxNames.
(IN) Points to a request buffer containing the names of the syntaxes for which information is to be returned.
(IN/OUT) Points to information needed to resume subsequent iterations of NWDSReadSyntaxes.
(OUT) Points to a result buffer containing the requested syntax names and/or definitions.
0x0000 0000 |
SUCCESSFUL |
nonzero value |
Nonzero values indicate errors. See |
The infoType, allSyntaxes, nd syntaxNames parameters indicate what syntax information is requested.
The infoType parameter uses two flags which specify what information is returned.
Flag |
Description |
---|---|
DS_SYNTAX_NAMES |
Returns only syntax names |
DS_SYNTAX_DEFS |
Returns syntax names with a Syntax_Info_T structure that contains the syntax ID and the syntax matching rules |
If allSyntaxes is TRUE, information is returned for all syntaxes defined for the eDirectory tree, and syntaxNames is ignored. If allSyntaxes is FALSE, only the syntaxes specified by syntaxNames are requested.
If allSyntaxes is FALSE and syntaxNames is NULL, no syntax information is returned, and infoType is not meaningful.
The syntaxNames parameter is a request buffer containing the names of the specific syntaxes whose information is to be returned. It is used to explicitly specify the syntaxes to be returned.
The iterationHandle parameter controls the retrieval of results that are larger than the result buffer pointed to by syntaxDefs.
Before the initial call to NWDSReadSyntaxes, set the contents of the iteration handle pointed to by iterationHandle to NO_MORE_ITERATIONS.
If the result buffer holds the complete results when NWDSReadSyntaxes returns from its initial call, the location pointed to by iterationHandle is set to NO_MORE_ITERATIONS. If the iteration handle is not set to NO_MORE_ITERATIONS, use the iteration handle for subsequent calls to NWDSReadSyntaxes to obtain further portions of the results. When the results are completely retrieved, the contents of the iteration handle will be set to NO_MORE_ITERATIONS.
NOTE:To end the Read operation before the complete results have been retrieved, call NWDSCloseIteration with a value of DSV_READ_SYNTAXES to free memory and states associated with NWDSReadSyntaxes.
The level of granularity for partial results is an individual syntax definition.
The syntaxDefs parameter points to a result buffer receiving the requested information. This buffer contains either a list of syntax names or a sequence of syntax name and definitions, depending upon the value of infoType.
Read results from the buffer by calling NWDSGetSyntaxCount and NWDSGetSyntaxDef.
The results of NWDSReadSyntaxes are not ordered, meaning the syntaxes might not be stored in the result buffer in alphabetical order.
For more information, see Retrieving Syntax Names and Definitions.