BIMPORT_PARMS

The BIMPORT_PARMS structure contains information for the BatchImport function.

Quick Info

Header file: DAPI.H
Unicode: Yes

typedef struct
{
  DWORD             dwDAPISignature;
  DWORD             dwFlags;
  HWND              hwndParent;
  LPTSTR            pszImportFile;
  UINT              uCodePage;
  LPTSTR            pszDSAName;
  LPTSTR            pszBasePoint;
  LPTSTR            pszContainer;
  TCHAR             chColSep;
  TCHAR             chQuote;
  TCHAR             chMVSep;
  TCHAR             creserved;
  CALLBACKPROGRESS  ProgressCallBacks;
  ERROR_CALLBACK    ErrorCallback;
  LPTSTR            pszNTDomain;
  LPTSTR            pszCreateTemplate;
}  BIMPORT_PARMS, *PBIMPORT_PARMS, *LPBIMPORT_PARMS;
 

Members

dwDAPISignature
Verifies that the parameter sequence used by the calling application is the same as expected by the directory functions. The value should be set to DAPI_SIGNATURE, which is defined in DAPI.H.
dwFlags
Defined values that control the directory import operation (see BatchImport). Use the bitwise OR operator (|) to enable multiple operations:
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
Imports data in raw mode (import 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 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.
DAPI_OVERRIDE_CONTAINER
The container specified in the parameter block overrides the contents of the container column. The default behavior is for the value specifed in the Obj-Container column to override the value specified in the parameter block.
DAPI_IMPORT_NO_ERR_FILE
Does not create an error file.
DAPI_IMPORT_WRITE_THROUGH
Commits write operations immediately.
DAPI_RESTRICT_ACCESS
Applies the Windows NT Security Descriptor to created objects.
DAPI_MODIFY_REPLACE_PROPERTIES
Overwrites any existing properties when modifying.
DAPI_CREATE_NT_ACCOUNT
Creates Windows NT accounts as required.
DAPI_CREATE_RANDOM_PASSWORD
Generates a random password for newly created Windows NT accounts. This flag is ignored if DAPI_CREATE_NT_ACCOUNT is not set.
DAPI_DELETE_NT_ACCOUNT
Deletes ASSOC_NT_ACCOUNT when deleting a mailbox.
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.
pszImportFile
The fully qualified path of the import file.

BatchImport imports objects from the file specified by this member into the directory information tree (DIT).

uCodePage
The code-page specification (text format) for the import file:
DAPI_UNICODE_FILE
The import file is created in Unicode format.
0
If the import files exists, the data is imported in the format of the existing import file. Otherwise, the import file is created in ANSI format.
other
The import file is created in this ANSI codepage format. This ANSI codepage format must already be installed on the system.

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

BatchImport also fails and emits a diagnostic error message in the Windows NT Application event log if the uCodePage 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 (DSA) to use when importing objects. If this member is NULL, BatchImport attempts to find a DSA on the local computer. Otherwise, BatchImport broadcasts for a DSA to the servers on its network and uses the name that is returned as a result of the broadcast.

If this member is NULL, BatchImport 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 (DN) of the messaging site or container that serves as the directory information tree basepoint for bulk operations. A DN 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, as specified by the pszDSAName parameter member, resides; if pszBasePoint is ““ (an empty string), the basepoint is the current organization object. The basepoint is the point in the DIT where BatchImport performs its bulk object creation or bulk object manipulation operations.

pszContainer
The DN or relative distinguished name (RDN) of the default container where objects are imported. If this member is NULL, BatchImport assumes that the container is below the level indicated by the pszBasePoint member. If this member is an RDN, BatchImport assumes that the container is relative to the level indicated by the pszBasePoint member. The container name in the export file can override this value.

If this member is NULL, BatchImport 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, Batchimport 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, BatchImport 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, BatchImport 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, BatchImport 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, BatchImport calls the default error handler, which displays an error dialog window and posts the error into the Windows NT Application event log.

pszNTDomain
Name of the primary Windows NT Server domain in which to create or find Windows NT accounts. If this parameter is NULL, the function uses the primary Windows NT Server domain name (the domain on which the executing process computer’s account is logged on).

If this member is NULL, BatchImport uses the primary Windows NT Server domain name (the domain where the executing process computer’s account is logged on).

pszCreateTemplate
A DN or RDN of the user object that serves as the template for creating new user objects. If this member is an RDN, BatchImport uses the pszBasePoint and pszContainer members to determine the path to the template. If this member is NULL, BatchImport does not use a template when creating new user objects.

BatchImport reads the properties associated with the default user’s mailbox and uses this information as a standard configuration that all imported user objects inherit. BatchImport caches this information and only updates those properties applicable to the given import object. Set this member to NULL if there is no default template object. See the Microsoft Exchange Server Administrator’s Guide for more information about formatting the template object.

Remarks

For additional information on this structure, see Importing and Manipulating Objects.

See Also

BatchImport