BEXPORT_PARMS

The BEXPORT_PARMS structure contains information for the BatchExport function.

Quick Info

Header file: DAPI.H
Unicode: Yes

typedef struct
{
  DWORD             dwDAPISignature;
  DWORD             dwFlags;
  HWND              hwndParent;
  LPTSTR            pszExportFile;
  UINT              uCodePage;
  LPTSTR            pszDSAName;
  LPTSTR            pszBasePoint;
  LPTSTR            pszContainer;
  TCHAR             chColSep;
  TCHAR             chQuote;
  TCHAR             chMVSep;
  TCHAR             cReserved; 
  CALLBACKPROGRESS  ProgressCallBacks;
  ERROR_CALLBACK    ErrorCallback;
  EXPORT_CALLBACK   ExportCallback;
  PDAPI_ENTRY       pAttributes;
  LPTSTR            pszHomeServer;
  LPTSTR *          rgpszClasses;
  ULONG             ulUSNBase; 
  LPVOID            pReserved;
}  BEXPORT_PARMS, *PBEXPORT_PARMS, *LPBEXPORT_PARMS;
 

Members

dwDAPISignature
Must be set to the defined value DAPI_SIGNATURE (see DAPI.H). Verifies that the parameter sequence used by the calling application is the same as that expected by the directory functions.
dwFlags
Defined values that control the directory export operation (see BatchExport). Use the bitwise OR operator (|) to enable multiple operations:
DAPI_EXPORT_MAILBOX
Exports mailbox recipient objects.
DAPI_EXPORT_CUSTOM
Exports remote address recipient objects.
DAPI_EXPORT_DIST_LIST
Exports distribution list objects.
DAPI_EXPORT_RECIPIENTS
Exports all recipient objects.
DAPI_EXPORT_ALL_CLASSES
Exports all object classes.
DAPI_EXPORT_HIDDEN
Exports any hidden objects. By default, if the Hide-From-Address-Book attribute is set, hidden objects are not exported.
DAPI_EXPORT_SUBTREE
Exports the directory object and any directory objects beneath it in the DIT.
DAPI_EXPORT_BASEPOINT_ONLY
Exports only the requested attributes from the object identified by pszBasePoint.
DAPI_EVENT_MIN
Logs start and stop messages; does not log warning or error messages.
DAPI_EVENT_SOME
Logs start, stop, and error messages; does not log warning messages.
DAPI_EVENT_ALL
Logs all messages (start, stop, error, and warning).
DAPI_FORCE_SCHEMA_LOAD
Unloads a previously loaded schema and reads the schema again. The default action is to reuse the previously loaded schema if it is read from the same messaging domain.
DAPI_RAW_MODE
Exports data in raw mode (export lines are taken literally). No properties are inherited or constructed. Aliases for property and class names are not recognized.
DAPI_SUPPRESS_PROGRESS
Suppresses the progress thermometer that normally appears during batch operations.
DAPI_SUPPRESS_COMPLETION
Suppresses the notification message window that normally appears following the completion of a batch operation.
DAPI_SUPPRESS_ARCHIVES
Suppresses the creation of an archive copy of any output files that normally are created during batch operations.
hwndParent
The window handle to use when displaying message boxes. Set this member to NULL to use the handle of the main window of the calling application.
pszExportFile
The fully qualified path of the file where the directory information tree objects are exported. BatchExport ignores this member if the ExportCallback member is specified.
uCodePage
The code-page specification (text format) for the export file:
DAPI_UNICODE_FILE
The export file is created in Unicode format.
0
If the export files exists, the data is exported in the format of the existing export file. Otherwise, the export file is created in ANSI format.
other
The export file is created in this ANSI code-page format. This ANSI code-page format must already be installed on the system.

If this member is DAPI_UNICODE_FILE (which specifies that the DIT object is in Unicode format), but the DIT object is in ANSI format, BatchExport fails and emits a diagnostic error message in the Windows NT Application event log.

BatchExport also fails and emits a diagnostic error message in the Windows NT Application event log if this member is a format other than DAPI_UNICODE_FILE or 0 (zero, which is autodetect) and either of the following conditions is true:

pszDSAName
The directory service agent to use when exporting objects. If this member is NULL, BatchExport attempts to find a directory service agent on the local computer. Otherwise, BatchExport broadcasts for a directory service agent to the servers on its network and uses the name that is returned as a result of the broadcast.

If this member is NULL, BatchExport searches for a DSA in the following order:

  1. If a DSA exists on the local computer, use it.
  2. Otherwise, broadcast for a DSA and use one of the DSAs that replies.

Use MAPI function calls to determine the DSA. See the MAPI Programmer’s Reference for more information.

pszBasePoint
The distinguished name of the messaging site or container that serves as the directory information tree basepoint for bulk operations. A distinguished name is the combination of an object’s path and name in the Xopen hierarchical naming structure.

If this member is NULL, the basepoint is the current site object where the DSA resides (as specified by the lpBexportParms->pszDSAName parameter member); if lpBexportParms->pszBasePoint is ““ (an empty string), the basepoint is the current organization object. The basepoint is the point in the DIT where BatchExport performs its bulk object creation or bulk object manipulation operations.

pszContainer
The distinguished name or relative distinguished name of the default container where objects are exported. If this member is NULL, BatchExport assumes that the container is below the level indicated by the pszBasePoint member. If this member is a relative distinguished name, BatchExport assumes that the container is relative to the level indicated by the pszBasePoint member. The container name in the import file can override this value.

If this member is NULL, BatchExport exports the contents of all containers below the point specified by the pszBasePoint member.

chColSep
The column separator that is used within the export file. Specify your preferred column separator, even if it is the same as the default.

If this member is NULL, BatchExport uses the default separator, which is defined as DEFAULT_DELIM (see DAPI.H).

The default column separator used by the directory functions is unrelated to the default column separator specified within the Administrator program.

chQuote
The character that is used to enclose strings within the export file. Do not use the ~, #, or = characters. Specify your preferred string enclosure separator, even if it is the same as the default.

If this member is NULL, BatchExport uses the default string enclosure character, which is defined as DEFAULT_QUOTE (see DAPI.H).

chMVSep
The value separator for multivalued properties within the export file. A separator character is required, for example, by the members of a distribution list. A percent sign inside a quoted string is interpreted as a literal character. Specify your preferred value separator, even if it is the same as the default.

If this member is NULL, BatchExport uses the default multivalue separator character, which is defined as DEFAULT_MV_SEP (see DAPI.H).

cReserved
Unused and reserved for future use.
ProgressCallBacks
A structure that contains pointers to functions that display the progress of the operation.

If this member is NULL, BatchExport displays a default modeless dialog to show progress.

ErrorCallback
A structure that contains a pointer to a function that is to be called on each error encountered.

If this member is NULL, BatchExport calls the default error handler, which displays an error dialog window and writes the error into the Windows NT Application event log.

ExportCallback
A structure that contains a pointer to a function that is to be called on each exported item.

If this member is NULL, BatchExport writes to the file specified by the pszExportFile parameter member.

pAttributes
Points to a DAPI_ENTRY structure containing the names of attributes to export.

If you specify export attributes in this member, the first attribute in pAttributes must be NM_OBJECT_CLASS; otherwise, BatchExport fails.

Normally, BatchExport does not export deleted objects. You can export directory objects that are deleted, but not purged, by including the NM_IS_DELETED attribute.

The pAttributes member is required if the ExportCallback member is specified; it is optional if the pszExportFile member is specified.

pszHomeServer
Only objects that reside on this server are exported. If this member is not NULL, only mailboxes are exported, as they are the only objects that reside on a server.

This member specifies that the mailboxes from only the specified server are exported. If pszHomeServer is NULL, BatchExport exports the mailboxes from all servers.

rgpszClasses
An array of pointers to zero-terminated strings specifying the object classes to export. The last entry must be NULL. The object classes can also be specified in dwFlags, but the values in this member take precedence over any class settings in dwFlags.

BatchExport queries the directory for objects of the specified classes in the order that you specify the classes in this member.

ulUSNBase
Update sequence number (USN). If this member is nonzero, only objects whose USN-Changed attribute is greater than this value are exported.

BatchExport exports only objects with USN-Changed greater than or equal to this member when EXPORT_USE_USN_BASE is set.

pReserved
Reserved. Must be zero.

Remarks

For additional information on this structure, see Exporting Objects.

See Also

BatchExport