Setting Export Flags

You can set several flags to indicate the types of objects to be exported and specify further locations in the directory information tree (DIT) from which objects are exported. These flags are set in the dwFlags member of the BEXPORT_PARMS structure, which is passed in the lpBexportParms parameter in the BatchExport function call.

For example, unless the DAPI_EXPORT_BASEPOINT_ONLY flag is set, only objects below the basepoint may be exported. Because the organization is the highest object in a standard Microsoft Exchange Server DIT, it is not possible to export it without setting the DAPI_EXPORT_BASEPOINT_ONLY flag.

Flags Used with BatchExport to Customize Export Operations

Flag Action
DAPI_EXPORT_MAILBOX Exports mailbox recipients
DAPI_EXPORT_CUSTOM Exports remote address recipients
DAPI_EXPORT_DIST_LIST Exports distribution lists (DL)
DAPI_EXPORT_RECIPIENTS Exports all recipient objects: DAPI_EXPORT_MAILBOX | DAPI_EXPORT_CUSTOM | DAPI_EXPORT_DIST_LIST
DAPI_EXPORT_HIDDEN Includes hidden objects in export. The default is no export if Hide-From-Address-Book is set.
DAPI_EXPORT_SUBTREE Makes the export operation recursive to lower levels of the DIT.
DAPI_EXPORT_ALL_CLASSES Exports all objects (not only recipient objects).
DAPI_EXPORT_BASEPOINT_ONLY Exports only the requested attributes from the named basepoint object. All other export restrictions are ignored (class flags, rgpszClasses, pszHomeServer). This flag implies DAPI_SUPPRESS_PROGRESS and DAPI_SUPPRESS_COMPLETION.