Platform SDK: Exchange Server

ATT_VALUE

The ATT_VALUE structure contains either an attribute name or one or more attribute values for directory access operations.

Quick Info

Header file: DAPI.H

typedef struct
{
  DAPI_DATA_TYPE       DapiType;
  DAPI_VALUE           Value;
  UINT                 size;
  struct _ATT_VALUE *  pNextValue;
}  ATT_VALUE, * PATT_VALUE;
 

Members

DapiType
How to evaluate the type of the DAPI_VALUE union. The valid values are:
DAPI_NO_VALUE
No property.
DAPI_STRING8
The property is of type PT_STRING8.
DAPI_UNICODE
The property is of type PT_UNICODE.
DAPI_BINARY
The property is of type PT_BINARY.
DAPI_INT
The property is of type PT_INT.
DAPI_BOOL
The property is of type PT_BOOLEAN.

For additional information on property types, see Microsoft Exchange Server Property Types.

Value
A DAPI_VALUE union containing either the name of the attribute or the value of the attribute. For exported attribute names, DapiType is either DAPI_STRING8 or DAPI_UNICODE.

The DAPI_VALUE union is defined as follows:

typedef union
{
   LPSTR    pszA;
   LPWSTR   pszW;
#ifdef UNICODE
   LPWSTR   pszValue;
#else
   LPSTR    pszValue;
#endif
   LPBYTE   lpBinary;
   INT      iValue;
   BOOL     bool;
} DAPI_VALUE, * PDAPI_VALUE;
 
pszA
The name of the attribute when DapiType is DAPI_STRING8.
pszW
The name of the attribute when DapiType is DAPI_UNICODE.
pszValue
The value of the attribute when DapiType is DAPI_UNICODE (when UNICODE is defined) or DAPI_STRING8 (when UNICODE is not defined).
lpBinary
The value of the attribute when DapiType is DAPI_BINARY.
iValue
The value of the attribute when DapiType is DAPI_INT.
bool
The value of the attribute when DapiType is DAPI_BOOL.
size
Either the length, in chars, of the string in Value, if DapiType is DAPI_STRING8 or DAPI_UNICODE; or the size, in bytes, of the attribute in Value, if DapiType is DAPI_BINARY, DAPI_INT, or DAPI_BOOL.
pNextValue
Points to the next ATT_VALUE structure; NULL if this is the last or only attribute name or value (see Remarks).

Remarks

For ATT_VALUE structures in BatchExport function callbacks, the data is valid only during the export callback. As soon as program control returns to the calling function (BatchExport), the values in all ATT_VALUE structures are no longer valid.

Each ATT_VALUE structure stores either the name of an attribute or the values for an attribute. If 15 attributes are exported in a given operation, 15 ATT_VALUE structures are created. If any of the attributes in the directory are valueless, their corresponding ATT_VALUE structures are empty. The only exception to this rule is when data is exported in the TEXT_LINE format. In this case, a single ATT_VALUE structure contains all attribute names, and another ATT_VALUE structure contains all attribute values in a single, delimited, text string.

Initial attributes (single-valued attributes and the first value of multivalued attributes) use an array of ATT_VALUE structures. Subsequent values of multivalued attributes are written to additional ATT_VALUE structures in a linked list. The pNextValue member points to the second (and subsequent) members of this linked list. In the case of a TEXT_LINE exporting multiple values for multivalued attributes, these attributes are stored in a single text string, delimited by the multivalued delimiter.

For additional information on this structure, see Interpreting Exported Data and Importing Multivalued Properties with DAPIWrite.

See Also

BatchExport, BEXPORT_PARMS, DAPI_ENTRY, DAPIRead, DAPIWrite