If the function is successful, it returns account information and the return value is NET_API_STATUS.
If the function fails, the return value is one of the following error codes.
Value Meaning
ERROR_ACCESS_DENIED The user does not have access to the requested information.
NERR_InvalidComputer The computer name is invalid.
NERR_NotPrimary The operation is allowed only on the primary domain controller of the domain.
NERR_UserNotFound The user name could not be found.
NERR_PasswordTooShort The password is shorter than required.