Input parameter. Specifies the directory operation session handle obtained through DAPIStart.
dwFlags
Accepts defined values that control the directory write operations. Use the bitwise OR operator (|) to enable multiple operations:
DAPI_WRITE_UPDATE
If an object exists, you modify it; if it doesn't exist, you create it. This is the default mode.
DAPI_WRITE_CREATE
Creates the object. If the object exists, DAPIWrite fails.
DAPI_WRITE_MODIFY
Modifies the object. If the object does not exist, DAPIWrite fails.
DAPI_WRITE_DELETE
Deletes the object.
pAttributes
Input parameter. Points to a DAPI_ENTRY structure containing the names of attributes to write. If NULL, This function uses the session default list specified by DAPIStart.
pValues
Input parameter. Points to a DAPI_ENTRY structure containing the values to set on the DIT entry.
Note You can override the DAPI_WRITE_CREATE, DAPI_WRITE_DELETE, DAPI_WRITE_MODIFY, and DAPI_WRITE_UPDATE values in dwFlags by setting the second value in pAttributes to Mode and the second value in pValues to create, delete, modify, or update.
lpulUSN
Input/output parameter. Points to the USN of the updated DIT entry. If NULL, DAPIWrite does not update this value.
lppszCreatedAccount
Input parameter. Points to the name of created Windows NT account.
lppszPassword
Input parameter. Points to the password generated if a Windows NT account is created.