5.16 Information Types for Search and Read

The following flags are found in the nwdsdefs.h file and specify the type of information to return. The NWDSSearch, NWDSReadReferences, NWDSExtSyncRead, NWDSExtSyncSearch, and NWDSItrCreateSearch functions support only the first two types: DS_ATTRIBUTE_NAMES and DS_ATTRIBUTE_VALUES. The NWDSRead function supports all of them.

All the functions that use these information types return the information to an output buffer. The information must be retrieved from the buffer with specialized functions. All of the information types require the use of two functions: NWDSGetAttrCount and NWDSGetAttrName. Use the NWDSGetAttrCount to determine the number of attributes associated with the object. Use the NWDSGetAttrName function to retrieve the name and the number of values associated with the attribute. If only names have been requested, the number of values will always be zero. If the information type returns additional information, you will need to use the specialized functions to retrieve the additional information before retrieving the next attribute name.

Name

C Value

Description

DS_ATTRIBUTE_NAMES

0x00

Returns only the names of the attributes.

DS_ATTRIBUTE_VALUES

0x01

Returns the names and the values of the attributes. Use the NWDSGetAttrVal function to retrieve the values. Call this function once for each value associated with the attribute before getting the name of the next attribute.

If the value's size is unknown (most attributes have known sizes), use NWDSComputeAttrValSize before retrieving the value.

DS_EFFECTIVE_PRIVILEGES

0x02

Returns the names and effective privileges of the requester to the attributes.

DS_VALUE_INFO

0x03

Returns the attribute name, number of values, value flags (see Section 5.2, Attribute Value Flags), timestamp, and value. Use the NWDSGetAttrValFlags function to retrieve the attribute value flag information. Use the NWDSGetAttrValModTime function to retrieve the modification timestamp for the value.

DS_ABBREVIATED_VALUE

0x04

Returns the attribute name, number of values, attribute value flags (see Section 5.2, Attribute Value Flags), timestamp, and length of the value. Use the NWDSGetAttrValFlags function to retrieve the attribute value flag information. Use the NWDSGetAttrValModTime function to retrieve the modification timestamp.

DS_EXPANDED_CLASS

0x08

Reserved.