NWDSGetSyntaxDef

Retrieves the next eDirectory-syntax definition from a result buffer filled by NWDSReadSyntaxes.

NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98, Windows 2000, Windows XP
Library:Cross-Platform NDS (NET*.*)
Service:NDS

Syntax

C

  #include <nwnet.h> 
  or 
  #include <nwdsbuft.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSGetSyntaxDef  ( 
     NWDSContextHandle   context,  
     pBuf_T              buf,  
     pnstr8              syntaxName,  
     pSyntax_Info_T      syntaxDef); 
  

Pascal

  uses netwin32 
   
  Function NWDSGetSyntaxDef 
    (context : NWDSContextHandle; 
     buf : pBuf_T; 
     syntaxName : pnstr8; 
     syntaxDef : pSyntax_Info_T 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS 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 0000

SUCCESSFUL

nonzero value

Nonzero values indicate errors. See NDS Return Values (–001 to –799).

Remarks

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.

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

The syntaxName parameter points to the name of the syntax 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 Unicode characters (Unicode characters are always 16 bits). One character is used for NULL termination.

The syntaxDef parameter 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 must be NULL.

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

For the complete steps on retrieving information about the syntaxes in the eDirectory schema, see Retrieving Syntax Names and Definitions.

NCP Calls

See Also

NWDSGetSyntaxCount, NWDSReadSyntaxes