All the flags you can use with the directory access functions to control export and import operations are described in the following tables. The first table provides descriptions for all flags used with directory access functions, and the subsequent tables (Flags Used with Directory Access Batch Functions and Flags Used with Directory Access Non-Batch Functions) specify which functions each flag is used with.
DAPI_EVENT_MASK and DAPI_WRITE_MODE_MASK are not flags as such, but as masks used for determining the opcode for event filtering and write operations, respectively.
Directory Access Flag Descriptions
Flag | Value | Description |
---|---|---|
DAPI_EVENT_MASK | 0x00000007 | Bit-field containing event-filtering requested. If none of these bits are set, DAPI_EVENT_ALL is assumed. |
DAPI_EVENT_MIN | 0x00000001 | Logs start and stop messages. No warning or error logging. |
DAPI_EVENT_SOME | 0x00000002 | Logs start, stop, and error messages. |
DAPI_EVENT_ALL | 0x00000004 | Logs start, stop, error, and warning messages. |
DAPI_FORCE_SCHEMA_LOAD | 0x00000010 | Unloads previously loaded schema and rereads the schema. Default action is to use the cached schema if read from the same messaging domain. |
DAPI_RAW_MODE | 0x00000020 | Imports or exports in raw mode, which means that import lines are taken literally. No attributes are inherited or constructed. Aliases for attribute and class names are not recognized. |
DAPI_OVERRIDE_CONTAINER | 0x00000040 | The container specified in the parameter block overrides the contents of the container column. Default behavior is for the value specified in the Obj-Container column to override that specified in the parameter block. |
DAPI_MODIFY_REPLACE_PROPERTIES | 0x00800000 | Causes existing data to be overwritten.
|
Flags Defined for Batch Operations Only (Ignored by DAPIRead and DAPIWrite) | Value | Description |
DAPI_IMPORT_NO_ERR_FILE | 0x00000080 | Does not create an error file (applies only to the BatchImport function). |
DAPI_YES_TO_ALL | 0x00000100 | Forces Yes response on any user-prompt question. For example: continue without proxy addresses. |
DAPI_SUPPRESS_PROGRESS | 0x00000200 | Suppresses the display of progress thermometer on batch operations. The default is to display progress. |
DAPI_SUPPRESS_COMPLETION | 0x00000400 | Suppresses the completion notification message box on batch operations. |
DAPI_SUPPRESS_ARCHIVES | 0x00000800 | Suppresses the creation of archive copies of output files. Applies only to the BatchImport and BatchExport functions. |
DAPI_IMPORT_WRITE_THROUGH | 0x00400000 | Commits write operations immediately. Lazy-commit only is applied in BatchImport, so that we can guarantee a flush on the last item. |
Flags Defined for BatchExport | Value | Description |
DAPI_EXPORT_MAILBOX | 0x00001000 | Exports mailbox recipients. |
DAPI_EXPORT_CUSTOM | 0x00002000 | Exports remote address recipients. |
DAPI_EXPORT_DIST_LIST | 0x00004000 | Exports distribution lists. |
DAPI_EXPORT_RECIPIENTS | 0x00007000 | Exports all recipient objects. |
DAPI_EXPORT_ALL_CLASSES | 0x00008000 | Exports objects of all classes. |
DAPI_EXPORT_HIDDEN | 0x00010000 | Includes hidden objects in export. Default is no export if Hide-From-Address-Book is set. |
DAPI_EXPORT_SUBTREE | 0x00020000 | Makes the export operation recursive to lower levels of the directory information tree. |
DAPI_EXPORT_BASEPOINT_ONLY | 0x00040000 | Exports only the requested attributes from the named BasePoint object. All other export restrictions are ignored (class flags, rgpszClasses, pExportFilter, pszServerName). This flag implies IMPORT_SUPRESS_PROGRESS and IMPORT_SUPRESS_COMPLETION |
Flags Defined for DAPIRead | Value | Description |
DAPI_READ_DEFINED_ATTRIBUTES | 0x00100000 | Returns all attributes that are set for the current object. See Note 1 in Table Notes below for precedence with respect to pAttributes. |
DAPI_READ_ALL_ATTRIBUTES | 0x00200000 | Returns all attributes that are defined for the class of the current object. If set, pAttributes is ignored. See Note 1 in Table Notes below for precedence with respect to pAttributes. |
Flags That Control Windows NT Server Security Management | Value | Description |
DAPI_RESTRICT_ACCESS | 0x01000000 | Applies a Windows NT security descriptor to created objects. |
DAPI_CREATE_NT_ACCOUNT | 0x02000000 | Creates Windows NT accounts (valid only in Create/Modify mode). |
DAPI_CREATE_RANDOM_PASSWORD | 0x04000000 | Generates random passwords for created Windows NT accounts. Ignored if the DAPI_CREATE_NT_ACCOUNT flag is not set. |
DAPI_DELETE_NT_ACCOUNT | 0x08000000 | Deletes ASSOC-NT-ACCOUNT when deleting mailbox. |
Flags Defined for DAPIWrite | Value | Description |
DAPI_WRITE_UPDATE | 0x10000000 | Default. Modifies if the object exists, creates if it doesn't. |
DAPI_WRITE_CREATE | 0x20000000 | Creates object; fails if the object exists. |
DAPI_WRITE_MODIFY | 0x30000000 | Modifies object; fail if the object does not exist. |
DAPI_WRITE_DELETE | 0x40000000 | Deletes the object. |
DAPI_WRITE_MODE_MASK | 0x70000000 | A mask used to determine the exact mode setting specified. Combining dwFlags and this flag yields the mode opcode. |
The following table lists the flags used with directory access batch functions NTExport, NWExport, BatchImport, and BatchExport. If you can specify a certain flag in a call to a given function, an x appears in the cell where the flag's row and the function's column intersect.
Directory Access Flags and Associated Functions (Batch Functions)
General Directory Access Flags | NT Export |
NW Export |
Batch Import |
Batch Export |
---|---|---|---|---|
DAPI_EVENT_MIN | x | x | x | x |
DAPI_EVENT_SOME | x | x | x | x |
DAPI_EVENT_ALL | x | x | x | x |
DAPI_FORCE_SCHEMA_LOAD | x | x | ||
DAPI_RAW_MODE | x | x | ||
DAPI_OVERRIDE_CONTAINER | x | |||
DAPI_IMPORT_NO_ERR_FILE | x | |||
DAPI_IMPORT_WRITE_THROUGH | x | |||
DAPI_MODIFY_REPLACE_PROPERTIES | x | |||
Flags Defined for Batch Operations Only | NT Export |
NW Export |
Batch Import |
Batch Export |
DAPI_YES_TO_ALL | x | |||
DAPI_SUPPRESS_PROGRESS | x | x | x | x |
DAPI_SUPPRESS_COMPLETION | x | x | x | x |
DAPI_SUPPRESS_ARCHIVES | x | x | ||
Flags Defined for BatchExport | NT Export |
NW Export |
Batch Import |
Batch Export |
DAPI_EXPORT_MAILBOX | x | |||
DAPI_EXPORT_CUSTOM | x | |||
DAPI_EXPORT_DIST_LIST | x | |||
DAPI_EXPORT_RECIPIENTS | x | |||
DAPI_EXPORT_ALL_CLASSES | x | |||
DAPI_EXPORT_HIDDEN | x | |||
DAPI_EXPORT_SUBTREE | x | |||
DAPI_EXPORT_BASEPOINT_ONLY | x | |||
Flags Used to Control Windows NT Server Security Management | NT Export |
NW Export |
Batch Import |
Batch Export |
DAPI_RESTRICT_ACCESS | x | |||
DAPI_CREATE_NT_ACCOUNT | x | |||
DAPI_CREATE_RANDOM_PASSWORD | x | |||
DAPI_DELETE_NT_ACCOUNT | x |
The following table lists the flags used with directory access non-batch functions DAPIStart, DAPIRead, DAPIWrite, and SchemaPreload. Currently, no flags are used with the DAPIGetSiteInfo function.
If you can specify a certain flag in a call to a given function, an x appears in the cell where the flag's row and the function's column intersect.
Directory Access Flags and Associated Functions (Non-Batch Functions)
General Directory Access Flags | DAPI Start |
DAPI Read |
DAPI Write |
Schema Preload |
---|---|---|---|---|
DAPI_EVENT_MIN | x | |||
DAPI_EVENT_SOME | x | |||
DAPI_EVENT_ALL | x | |||
DAPI_FORCE_SCHEMA_LOAD | x | x | ||
DAPI_RAW_MODE | x | x | ||
DAPI_OVERRIDE_CONTAINER | x | |||
DAPI_MODIFY_REPLACE_PROPERTIES
|
x 2 | x | ||
Flags Defined for DAPIRead | DAPI Start |
DAPI Read |
DAPI Write |
Schema Preload |
DAPI_READ_DEFINED_ATTRIBUTES | x 1 | x 1 | ||
DAPI_READ_ALL_ATTRIBUTES
|
x 1 | x 1 | ||
Flags Used to Control Windows NT Server Security Management | DAPI Start |
DAPI Read |
DAPI Write |
Schema Preload |
DAPI_RESTRICT_ACCESS | x 2 | x | ||
DAPI_CREATE_NT_ACCOUNT | x 2,3 | x | ||
DAPI_CREATE_RANDOM_PASSWORD | x 2 | x | ||
DAPI_DELETE_NT_ACCOUNT
|
x 2 | x | ||
Flags Defined for DAPIWrite | DAPI Start |
DAPI Read |
DAPI Write |
Schema Preload |
DAPI_WRITE_UPDATE | x | |||
DAPI_WRITE_CREATE | x | |||
DAPI_WRITE_MODIFY | x | |||
DAPI_WRITE_DELETE | x | |||
Table Notes: 1. A precedence level is defined for determining the set of attributes to export. This is the precedence order, from highest to lowest: · pAttributes passed in the call to the DAPIRead function. · pAttributes passed on the call to the DAPIStart function. · If DAPI_READ_ALL_ATTRIBUTES is set in the call to either the DAPIRead function or the DAPIStart function, all attributes are exported. If DAPI_READ_DEFINED_ATTRIBUTES is set in both function calls, while DAPI_READ_ALL_ATTRIBUTES is not set in either, DAPI_READ_DEFINED_ATTRIBUTES takes precedence. 2. If set on DAPIStart, these flags may NOT be disabled on individual DAPIWrite calls. 3. DAPI_CREATE_NT_ACCOUNT implies DAPI_RESTRICT_ACCESS. |