NWDSGetSyntaxDef(3nw)


NWDSGetSyntaxDef -- retrieves next directory syntax definition from result buffer

Synopsis

   #include <nwnet.h> 
   or 
   #include <nwdsbuft.h> 
   

NWDSCCODE N_API NWDSGetSyntaxDef (NWDSContextHandle context, pBuf_T buf, pnstr8 syntaxName, pSyntax_Info_T syntaxDef);

Description

The parameters are as follows:

context
(IN) Specifies the Directory context for the request.

buf
(IN) Points to the result buffer being read.

syntaxName
(OUT) Points to the name of the syntax whose definition is stored at the current position in the result buffer.

syntaxDef
(OUT) Points to the syntax definition.

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).

Notices

Before the initial call to NWDSGetSyntaxDef, call NWDSGetSyntaxCount to determine the number of syntaxes whose information is stored in the result buffer. Then call NWDSGetSyntaxDef once for each syntax whose information is stored in the result buffer.

buf points to a result buffer containing information about syntaxes. This result buffer is allocated by NWDSAllocBuf and filled by NWDSReadSyntaxes.

syntaxName points to the name of the attribute whose definition is in the result buffer. The user must allocate memory to store the name. The size of the allocated memory is ((MAX_SCHEMA_NAMES_CHARS)+1)*sizeof(character size), where character size is 1 for single-byte characters, and 2 for double-byte characters (Unicode is double-byte). One character is used for NULL termination.

syntaxDef points to the remainder of the syntax definition. If NWDSReadSyntaxes was called with a request for syntax names only (DS_SYNTAX_NAMES), syntaxDef is ignored by NWDSGetSyntaxDef and can be NULL.

The user must allocate memory, sizeof(Syntax_Info_T), to receive the syntax definition.

The complete steps for retrieving information about the syntaxes in the Directory Schema are listed in the reference for NWDSReadSyntaxes.

Services

Directory

NCP calls

None

References

NWDSGetSyntaxCount(3nw), NWDSReadSyntaxes(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.