Exporting Objects

With directory access functions, you can write programs that export directory objects into an export file or retrieve information about objects into a structure. A typical use for an export file is synchronizing directories between a Microsoft Exchange Server site and a directory of a different type (such as a foreign mail system or a database). Directory data is exported from Microsoft Exchange Server into the file, which can then be delivered to the foreign system and imported by an application designed for that purpose.

The following illustration shows how data can be exported by generating an export file using the appropriate directory access functions.

Generating an export file using directory access functions

The directory access functions used for exporting enable you to export any attribute in the directory schema. Attributes to be exported are specified either with the pAttributes parameter and the DAPI_ENTRY structure, or as the first line of the export file.

The two primary functions used for exporting data are BatchExport and DAPIRead. With a call to BatchExport, data can be exported into an export file or retrieved into a structure; with DAPIRead, data can be retrieved only into a DAPI_ENTRY structure.

For information on exporting data into export files, see Using Export Files with BatchExport and Directory Access Function Files. For information on exporting data into structures, see Initializing Export Structures, Exporting Column Headers and Attribute Values, Choosing an Export Format, and Interpreting Exported Data.