NTEXPORT_PARMS

The NTEXPORT_PARMS structure contains information for exporting Windows NT Server directories.

Quick Info

Header file: DAPI.H
Unicode: Yes

typedef struct
{
  DWORD              dwDAPISignature;
  DWORD              dwFlags;
  HWND               hwndParent;
  LPTSTR             pszExportFile;
  CALLBACKPROGRESS   ProgressCallBacks;
  ERROR_CALLBACK     ErrorCallback;
  EXPORT_CALLBACK    ExportCallback;
  LPTSTR             pszDCName;
  LPTSTR             pszNTDomain;
}  NTEXPORT_PARMS, *PNTEXPORT_PARMS, *LPNTEXPORT_PARMS;
 

Members

dwDAPISignature
Verifies that the parameter sequence used by the calling application is the same as that expected by the directory function. The value should be set to DAPI_SIGNATURE, which is defined in the DAPI.H header file.
dwFlags
Defined values that control the directory export operation (see NTExport). Use the bitwise OR operator (|) to enable multiple operations:
DAPI_EVENT_MIN
Suppresses warning or error logging but logs start and stop messages.
DAPI_EVENT_SOME
Logs start, stop, and error messages.
DAPI_EVENT_ALL
Logs start, stop, error, and warning messages.
DAPI_SUPPRESS_PROGRESS
Suppresses the progress status update. (The default is to display progress.)
DAPI_SUPPRESS_COMPLETION
Suppresses display of all messages.
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
Full pathname of the text file where the account information is exported.

If this file exists, an error is returned. NTExport ignores this member if ProgressCallBacks is not NULL.

ProgressCallBacks
A structure that contains pointers to functions that display the progress of the batch export operation.

If this member is NULL, NTExport assumes that the calling application does not supply its own progress updates and displays a default modeless dialog to display the operation’s progress.

ErrorCallback
A structure that points to a function to be called when an error is encountered during the batch export operation.

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

ExportCallback
A structure that points to a function to be called when an account is exported.

If this member is NULL, NTExport writes the exported objects to the file specified by pszExportFile.

pszDCName
The name of the domain controller where the user information is obtained. Set this member to NULL to have NTExport poll the network for a domain controller and use the first domain controller that responds.

If this member is NULL, NTExport queries the domain for the name of an available domain controller.

pszNTDomain
The name of the Windows NT Server domain where the user information is obtained. Set this member to NULL to have NTExport use the primary Microsoft Windows NT Server domain name, which is the domain where the executing process computer’s account is logged on.

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

If pszDCName is specified, it overrides any value specified for pszNTDomain.

The following table describes the actions NTExport performs, depending on the values of pszNTDomain and pszDCName.
pszDCName pszNTDomain Action
NULL or "" NULL or "" Exports users from the current logon domain.
computer ignored Exports users from computer, which is either a domain controller (DC) or a server. If computer is a simple server, only the local users are extracted. If computer is either a primary DC (PDC) or a backup DC (BDC), the domain users are extracted.
\\computer ignored Exports users from computer, which is either a DC or a server. If computer is a simple server, only the local users are extracted. If computer is either a PDC or a BDC, the domain users are extracted.
NULL or "" domain Exports users whose PDC computer is identified by NetGetDCName. If that fails, get the PDC by calling NetGetAnyDCName.
NULL or "" \\computer Exports users from computer. The UNC name is assumed to specify a computer name.

Remarks

The NTEXPORT_PARMS structure is a parameter to the NTExport function.

For additional information on this structure, see Using Directory Access Functions.

See Also

NTExport