#include <windef.h>
#include <winbase.h>
+#include <winnls.h>
#include "wine/test.h"
#include <locale.h>
static int (__cdecl *p__dpcomp)(double x, double y);
static wchar_t** (CDECL *p____lc_locale_name_func)(void);
static unsigned int (CDECL *p__GetConcurrency)(void);
+static void* (CDECL *p__W_Gettnames)(void);
+static void (CDECL *p_free)(void*);
static BOOL init(void)
{
p__dpcomp = (void*)GetProcAddress(module, "_dpcomp");
p____lc_locale_name_func = (void*)GetProcAddress(module, "___lc_locale_name_func");
p__GetConcurrency = (void*)GetProcAddress(module,"?_GetConcurrency@details@Concurrency@@YAIXZ");
+ p__W_Gettnames = (void*)GetProcAddress(module, "_W_Gettnames");
+ p_free = (void*)GetProcAddress(module, "free");
return TRUE;
}
ok(c == si.dwNumberOfProcessors, "expected %u, got %u\n", si.dwNumberOfProcessors, c);
}
+static void test__W_Gettnames(void)
+{
+ static const char *str[] = {
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat",
+ "Sunday", "Monday", "Tuesday", "Wednesday",
+ "Thursday", "Friday", "Saturday",
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ "January", "February", "March", "April", "May", "June", "July",
+ "August", "September", "October", "November", "December",
+ "AM", "PM", "M/d/yyyy"
+ };
+
+ struct {
+ char *str[43];
+ int unk[2];
+ wchar_t *wstr[43];
+ wchar_t *locname;
+ char data[1];
+ } *ret;
+ int i, size;
+ WCHAR buf[64];
+
+ if(!p_setlocale(LC_ALL, "english"))
+ return;
+
+ ret = p__W_Gettnames();
+ size = ret->str[0]-(char*)ret;
+ if(sizeof(void*) == 8)
+ ok(size==0x2c0, "structure size: %x\n", size);
+ else
+ ok(size==0x164, "structure size: %x\n", size);
+
+ for(i=0; i<sizeof(str)/sizeof(*str); i++) {
+ ok(!strcmp(ret->str[i], str[i]), "ret->str[%d] = %s, expected %s\n",
+ i, ret->str[i], str[i]);
+
+ MultiByteToWideChar(CP_ACP, 0, str[i], strlen(str[i])+1,
+ buf, sizeof(buf)/sizeof(*buf));
+ ok(!lstrcmpW(ret->wstr[i], buf), "ret->wstr[%d] = %s, expected %s\n",
+ i, wine_dbgstr_w(ret->wstr[i]), wine_dbgstr_w(buf));
+ }
+ p_free(ret);
+
+ p_setlocale(LC_ALL, "C");
+}
+
START_TEST(msvcr120)
{
if (!init()) return;
test__dpcomp();
test____lc_locale_name_func();
test__GetConcurrency();
+ test__W_Gettnames();
}