NWDSExtSyncRead

Reads values from one or more of an eDirectory object’s attributes and places restrictions on the attributes' modification time.

Local Servers:blocking
Remote Servers:blocking
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 <nwdsdsa.h> 
   
  N_EXTERN_LIBRARY (NWDSCCODE)  NWDSExtSyncRead  ( 
     NWDSContextHandle   context,  
     pnstr8              objectName,  
     nuint32             infoType,  
     nbool8              allAttrs,  
     pBuf_T              attrNames,  
     pnint_ptr           iterationHandle,  
     pTimeStamp_T        timeStamp,  
     pBuf_T              objectInfo); 
  

Pascal

  uses netwin32 
   
  Function NWDSExtSyncRead 
    (context : NWDSContextHandle; 
     objectName : pnstr8; 
     infoType : nuint32; 
     allAttrs : nbool8; 
     attrNames : pBuf_T; 
     iterationHandle : pnint_ptr; 
     timeStamp : pTimeStamp_T; 
     objectInfo : pBuf_T 
  ) : NWDSCCODE;
  

Parameters

context

(IN) Specifies the NDS context for the request.

objectName

(IN) Points to the name of the object whose attributes are to be read.

infoType

(IN) Specifies the type of information desired (see Section 5.16, Information Types for Search and Read).

allAttrs

(IN) Specifies the scope of the request: TRUE=information concerning all attributes is requested; FALSE=only attributes named in the attrNames parameter are requested.

attrNames

(IN) Points to a request buffer containing the attribute names for which information is to be returned.

iterationHandle

(IN/OUT) Points to information needed to resume subsequent iterations of NWDSExtSyncRead. This should be set initially to NO_MORE_ITERATIONS.

timeStamp

(IN) Points to an object-modification time to be used as a filter.

objectInfo

(OUT) Points to a result buffer that receives the attribute names or names and values.

Return Values

0x0000 0000

SUCCESSFUL

nonzero value

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

Remarks

The name specified by objectName is relative to the current name context in the NDS context specified by context.

The infoType, allAttrs, attrNames, and timeStamp parameters indicate what attribute information is requested.

The infoType specifies whether both attribute names and attribute values are requested

If allAttrs is TRUE, information about all attributes associated with the object is requested and attrNames is ignored (in which case, assign a NULL pointer to attrNames). If allAttrs is FALSE, only the attributes specified by the result buffer pointed to by attrNames are requested.

If allAttrs is FALSE and attrNames is NULL, no attribute information is returned, and infoType is not meaningful. In this case, the return value of NWDSExtSyncRead can determine whether the specified object exists (verifying the objects distinguished name), or whether access to the object is allowed.

The request buffer pointed to by attrNames explicitly specifies the attributes to be returned. Initialize the buffer with a value of DSV_READ. For more information on setting up this buffer, see Reading Attributes of eDirectory Objects.

The timestamp pointed to by timeStamp is used to exclude attributes that have not been modified since a certain time. The timestamp filter limits the attribute list to be those attributes having modification times greater than or equal to the specified time.

When filling out TimeStamp_T, set eventID to zero, replicaNum to zero, and wholeSeconds to the appropriate value.

On return, the result buffer pointed to by objectInfo contains the requested information. This result buffer is allocated by calling NWDSAllocBuf. It is not initialized since it is a result buffer.

This result buffer either contains a list of attribute names or a sequence of attribute-name and attribute-value sets. The type of information returned depends on infoType. For more information, see Retrieving Results from eDirectory Output Buffers.

If the infoType parameter is set to return both attribute names and values, you cannot remove only names from the result buffer. You must remove the information in the correct order of attribute name first, then all of the values associated with the attribute. Then you remove the next attribute name and its values. Otherwise, NWDSGetAttrName will return erroneous information.

The iterationHandle parameter controls retrieval of search results larger than the result buffer pointed to by objectInfo.

Before the initial call to NWDSExtSyncRead, set the iterationHandle parameter to NO_MORE_ITERATIONS.

If the result buffer holds the complete results when NWDSExtSyncRead 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 NWDSExtSyncRead 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.

To end the Read operation before the complete results have been retrieved, call NWDSCloseIteration with a value of DSV_READ to free memory and states associated with the Read operation.

The level of granularity for partial results is an individual value of an attribute. If an attribute is multivalued and its values are split across two or more NWDSExtSyncRead results, the attribute name is repeated in each result.

The results of NWDSExtSyncRead are not ordered and might not be in alphabetical order.

NWDSExtSyncRead can be useful for detecting changes in an object’s attributes. However, NWDSExtSyncRead does not return information about attributes that have been deleted or for which your attribute privileges have changed.

NCP Calls

See Also

NWDSRead, NWDSReadObjectInfo