diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 7a346f2db8c..bd088f3f99d 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -950,6 +950,7 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem @ cdecl -noimport strspn(str str) strspn @ cdecl -noimport strstr(str str) strstr @ cdecl -noimport strtol(str ptr long) strtol +@ cdecl -noimport strtoul(str ptr long) strtoul @ varargs swprintf(wstr wstr) NTDLL_swprintf @ cdecl -noimport tan(double) tan @ cdecl tolower(long) tolower @@ -973,7 +974,7 @@ debug_channels (aspi atom cdrom console ddraw debug delayhlp dll dosfs dosmem @ cdecl wcstok(wstr wstr) NTDLL_wcstok @ cdecl wcstol(wstr ptr long) NTDLL_wcstol @ cdecl wcstombs(ptr ptr long) NTDLL_wcstombs -@ stub wcstoul +@ cdecl wcstoul(wstr ptr long) NTDLL_wcstoul @ stub NtAddAtom @ stub NtDeleteAtom @ stub NtFindAtom diff --git a/dlls/ntdll/wcstring.c b/dlls/ntdll/wcstring.c index a2842fdbb58..99df7401434 100644 --- a/dlls/ntdll/wcstring.c +++ b/dlls/ntdll/wcstring.c @@ -288,6 +288,21 @@ INT __cdecl NTDLL_wcstol(LPCWSTR s,LPWSTR *end,INT base) } +/********************************************************************* + * wcstoul (NTDLL.@) + * Like strtoul, but for wide character strings. + */ +INT __cdecl NTDLL_wcstoul(LPCWSTR s,LPWSTR *end,INT base) +{ + LPSTR sA = HEAP_strdupWtoA(GetProcessHeap(),0,s),endA; + INT ret = strtoul(sA,&endA,base); + + HeapFree(GetProcessHeap(),0,sA); + if (end) *end = ((LPWSTR)s)+(endA-sA); /* pointer magic checked. */ + return ret; +} + + /********************************************************************* * iswctype (NTDLL.@) */