The NetUserDCDBInit API initializes the domain control database for the specified user. This API replaces any existing user-specific database files with empty database files.
This API should not be called when targeted at a DSS Server.
Restrictions
This API can be called from DLS and OS/2 workstations, but DLS workstations can issue this call only to a remote LAN Server workstation.
For NetUserDCDBInit to run successfully, one of the following must be true:
#include <netcons.h>#include <dcdb.h> NetUserDCDBInit(pszServername, pszUserID, reserved); /* 16 bit */ Net32UserDCDBInit(pszServername, pszUserID, reserved, pszReservedX); /* 32 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
pszServername
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌─────────────────────────────┬───────┬────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_FILE_NOT_FOUND │ 2 │ The file was not found. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_TOO_MANY_OPEN_FILES │ 4 │ The maximum number of open files was
│
│ │ │ exceeded. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_NOT_ENOUGH_MEMORY │ 8 │ Sufficient memory is not available.
│
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_DATA │ 13 │ The specified data is not valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_PARAMETER │ 87 │ At least one parameter value is not
│
│ │ │ valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NetNotStarted │ 2102 │ The redirector NETWKSTA.200 has not
│
│ │ │ been started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_BufTooSmall │ 2123 │ The buffer is too small for fixed- │
│ │ │ length data. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidAPI │ 2142 │ The requested API is not supported on
│
│ │ │ the remote server. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_UserNotFound │ 2221 │ The user name cannot be found. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_DCDBError │ 2786 │ A domain control database file is │
│ │ │ unreadable or cannot be accessed at │
│ │ │ this time. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_NotPrimaryDCDB │ 2795 │ An attempt was made to access a domain
│
│ │ │ control database file on a machine │
│ │ │ that is not the domain controller. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘
Other codes could be returned from the following functions:
You can assume a user's domain control database (DCDB) area has not been initialized if the NetUserGetLogonAsn API is called and the ERROR_PATH_NOT_FOUND code is returned.