diff --git a/include/windows.h b/include/windows.h index 43bac90248..f9012048c6 100644 --- a/include/windows.h +++ b/include/windows.h @@ -6863,6 +6863,9 @@ UINT32 WINAPI GetMetaFileBitsEx(HMETAFILE32,UINT32,LPVOID); BOOL32 WINAPI GetMonitorInfo32A(HMONITOR,LPMONITORINFO); BOOL32 WINAPI GetMonitorInfo32W(HMONITOR,LPMONITORINFO); #define GetMonitorInfo WINELIB_NAME_AW(GetMonitorInfo) +INT32 WINAPI GetNumberFormat32A(LCID,DWORD,LPCSTR,const NUMBERFMT32A*,LPSTR,int); +INT32 WINAPI GetNumberFormat32W(LCID,DWORD,LPCWSTR,const NUMBERFMT32W*,LPWSTR,int); +#define GetNumberFormat WINELIB_NAME_AW(GetNumberFormat); BOOL32 WINAPI GetNumberOfConsoleInputEvents(HANDLE32,LPDWORD); BOOL32 WINAPI GetNumberOfConsoleMouseButtons(LPDWORD); DWORD WINAPI GetObjectType(HANDLE32); diff --git a/ole/ole2nls.c b/ole/ole2nls.c index 5bcb626f00..c5ae96d3e2 100644 --- a/ole/ole2nls.c +++ b/ole/ole2nls.c @@ -2824,10 +2824,9 @@ BOOL32 WINAPI EnumTimeFormats32W( /************************************************************************** * GetNumberFormat32A (KERNEL32.355) - * NOTE: type of lpFormat should be CONST NUMBERFORMAT */ INT32 WINAPI GetNumberFormat32A(LCID locale, DWORD dwflags, - LPCSTR lpvalue, char *lpFormat, + LPCSTR lpvalue, const NUMBERFMT32A * lpFormat, LPSTR lpNumberStr, int cchNumber) { int n; @@ -2844,6 +2843,27 @@ INT32 WINAPI GetNumberFormat32A(LCID locale, DWORD dwflags, } return n; } +/************************************************************************** + * GetNumberFormat32W (KERNEL32.xxx) + */ +INT32 WINAPI GetNumberFormat32W(LCID locale, DWORD dwflags, + LPCWSTR lpvalue, const NUMBERFMT32W * lpFormat, + LPWSTR lpNumberStr, int cchNumber) +{ + int n; + + FIXME(file,"%s: stub, no reformating done\n",debugstr_w(lpvalue)); + + n = lstrlen32W(lpvalue); + if (cchNumber) { + lstrcpyn32W(lpNumberStr,lpvalue,cchNumber); + if (cchNumber <= n) { + lpNumberStr[cchNumber-1] = 0; + n = cchNumber-1; + } + } + return n; +} /****************************************************************************** * OLE2NLS_CheckLocale [intern] */