#include <nwnet.h> or #include <nwdsdsa.h>NWDSCCODE N_API NWDSReadReferences (NWDSContextHandle context, pnstr8 serverName, pnstr8 objectName, nuint32 infoType, nbool8 allAttrs, pBuf_T attrNames, uint32 timeFilter, pnint32 iterationHandle, pBuf_T objectInfo);
infoType, allAttrs, and attrNames indicate what attribute information is requested.
infoType specifies whether both attribute names and 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 request buffer pointed to by attrNames are requested.
If allAttrs is FALSE and attrNames is NULL, no attribute information is returned. infoType is not meaningful. In this case, the return value of NWDSReadReferences 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. This request buffer is prepared by using the following steps:
The result buffer pointed to by objectInfo receives the requested information. This 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 value sets. The type of information returned depends on infoType. The results must be read from the result buffer using the following steps:
iterationHandle controls retrieval of search results larger than the result buffer pointed to by objectInfo.
Before the initial call to NWDSReadReferences, set the contents of the iteration handle pointed to by iterationHandle to NO_MORE_ITERATIONS.
When NWDSReadReferences returns from its initial call, if the result buffer holds the complete results, 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 NWDSReadReferences in order to obtain further portions of the results. When the results are completely retrieved, iterationHandle 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_REFERENCES 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 NWDSReadReferences results, the attribute name is repeated in each result.
The results of NWDSReadReferences are not ordered and might not be returned in alphabetical order.
If allAttrs is set to DS_ATTRIBUTE_VALUES, specifying the Read operation should return both attribute names and values, you cannot remove only the names from the result buffer. You must remove the information in the correct order of the attribute name first, then all of the values associated with the attribute. Then remove the next attribute name and its values. Otherwise, NWDSGetAttrName will return erroneous information.
Directory