diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index 5db057c6ea2..3a09c4323e9 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -2,7 +2,7 @@ * NT basis DLL * * This file contains the Nt* API functions of NTDLL.DLL. - * In the original ntdll.dll they all seem to just call int 0x2e (down to the HAL) + * In the original ntdll.dll they all seem to just call int 0x2e (down to the NTOSKRNL) * * Copyright 1996-1998 Marcus Meissner */ diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 27486d62e80..e025ebfb477 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -185,6 +185,7 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem @ stdcall NtQueryTimerResolution(long long long) NtQueryTimerResolution @ stdcall NtQueryValueKey(long long long long long long) NtQueryValueKey @ stub NtQueryVirtualMemory +@ stdcall NtQueryVolumeInformationFile(long ptr ptr long long) NtQueryVolumeInformationFile @ stdcall NtRaiseException(ptr ptr long) NtRaiseException @ stub NtRaiseHardError @ stdcall NtReadFile(long long long long long long long long long) NtReadFile @@ -686,7 +687,7 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem @ stub ZwQueryTimerResolution @ stub ZwQueryValueKey @ stub ZwQueryVirtualMemory -@ stub ZwQueryVolumeInformationFile +@ stdcall ZwQueryVolumeInformationFile(long ptr ptr long long) NtQueryVolumeInformationFile @ stub ZwRaiseException @ stub ZwRaiseHardError @ stdcall ZwReadFile(long long long long long long long long long) NtReadFile @@ -894,7 +895,7 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem @ cdecl _strnicmp(str str long) strncasecmp @ cdecl _strupr(str) _strupr @ cdecl _ultoa(long ptr long) _ultoa -@ stub _ultow +@ cdecl _ultow(long ptr long) _ultow @ cdecl _vsnprintf(ptr long ptr ptr) vsnprintf @ cdecl _wcsicmp(wstr wstr) NTDLL__wcsicmp @ cdecl _wcslwr(wstr) NTDLL__wcslwr diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c index 4cce518d876..6f43b0b4835 100644 --- a/dlls/ntdll/wcstring.c +++ b/dlls/ntdll/wcstring.c @@ -301,3 +301,36 @@ INT __cdecl NTDLL_iswalpha( WCHAR wc ) { return get_char_typeW(wc) & C1_ALPHA; } + + +/********************************************************************* + * _ultow (NTDLL) + * Like _ultoa, but for wide character strings. + */ +LPWSTR __cdecl _ultow(ULONG value, LPWSTR string, INT radix) +{ + WCHAR tmp[33]; + LPWSTR tp = tmp; + LPWSTR sp; + LONG i; + ULONG v = value; + + if (radix > 36 || radix <= 1) + return 0; + + while (v || tp == tmp) + { + i = v % radix; + v = v / radix; + if (i < 10) + *tp++ = i + '0'; + else + *tp++ = i + 'a' - 10; + } + + sp = string; + while (tp > tmp) + *sp++ = *--tp; + *sp = 0; + return string; +}