ntdll: Export RtlNtStatusToDosError from Unix lib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
116cf7dfcb
commit
8f31eb1edb
@ -59,6 +59,7 @@
|
||||
#include "wine/condrv.h"
|
||||
#include "wine/debug.h"
|
||||
#include "unix_private.h"
|
||||
#include "error.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(environ);
|
||||
|
||||
@ -2461,16 +2462,25 @@ NTSTATUS WINAPI NtQueryInstallUILanguage( LANGID *lang )
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* RtlUpcaseUnicodeChar (ntdll.so)
|
||||
*/
|
||||
WCHAR WINAPI RtlUpcaseUnicodeChar( WCHAR wch )
|
||||
{
|
||||
return ntdll_towupper( wch );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* RtlDowncaseUnicodeChar (ntdll.so)
|
||||
*/
|
||||
WCHAR WINAPI RtlDowncaseUnicodeChar( WCHAR wch )
|
||||
{
|
||||
return ntdll_towlower( wch );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* RtlUTF8ToUnicodeN (ntdll.so)
|
||||
*/
|
||||
NTSTATUS WINAPI RtlUTF8ToUnicodeN( WCHAR *dst, DWORD dstlen, DWORD *reslen, const char *src, DWORD srclen )
|
||||
{
|
||||
unsigned int res, len;
|
||||
@ -2527,3 +2537,20 @@ NTSTATUS WINAPI RtlUTF8ToUnicodeN( WCHAR *dst, DWORD dstlen, DWORD *reslen, cons
|
||||
*reslen = (dstlen - (dstend - dst)) * sizeof(WCHAR);
|
||||
return status;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* RtlNtStatusToDosError (ntdll.so)
|
||||
*/
|
||||
ULONG WINAPI RtlNtStatusToDosError( NTSTATUS status )
|
||||
{
|
||||
NtCurrentTeb()->LastStatusValue = status;
|
||||
|
||||
if (!status || (status & 0x20000000)) return status;
|
||||
if ((status & 0xf0000000) == 0xd0000000) status &= ~0x10000000;
|
||||
|
||||
/* now some special cases */
|
||||
if (HIWORD(status) == 0xc001 || HIWORD(status) == 0x8007 || HIWORD(status) == 0xc007)
|
||||
return LOWORD( status );
|
||||
|
||||
return map_status( status );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user