[NETAPI32]

NetpNtStatusToApiStatus: Map STATUS_INVALID_ACCOUNT_NAME to NERR_BadUsername.

svn path=/trunk/; revision=59590
This commit is contained in:
Eric Kohl 2013-07-27 18:53:52 +00:00
parent b466c46646
commit ca79d2f1e9

View file

@ -218,7 +218,24 @@ NET_API_STATUS
WINAPI
NetpNtStatusToApiStatus(NTSTATUS Status)
{
return RtlNtStatusToDosError(Status);
NET_API_STATUS ApiStatus;
switch (Status)
{
case STATUS_SUCCESS:
ApiStatus = NERR_Success;
break;
case STATUS_INVALID_ACCOUNT_NAME:
ApiStatus = NERR_BadUsername;
break;
default:
ApiStatus = RtlNtStatusToDosError(Status);
break;
}
return ApiStatus;
}
NET_API_STATUS WINAPI NetUseEnum(LMSTR server, DWORD level, LPBYTE* bufptr, DWORD prefmaxsize,