mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
comctl32: Export subclass calls by names too.
This commit is contained in:
parent
645f7c6208
commit
d926939b12
@ -101,10 +101,10 @@
|
||||
402 stdcall -noname FindMRUStringW(long wstr ptr)
|
||||
403 stdcall -noname EnumMRUListW(long long ptr long)
|
||||
404 stdcall -noname CreateMRUListLazyW(ptr long long long)
|
||||
410 stdcall -noname SetWindowSubclass(long ptr long long)
|
||||
411 stdcall -noname GetWindowSubclass(long ptr long ptr)
|
||||
412 stdcall -noname RemoveWindowSubclass(long ptr long)
|
||||
413 stdcall -noname DefSubclassProc(long long long long)
|
||||
410 stdcall -ordinal SetWindowSubclass(long ptr long long)
|
||||
411 stdcall -ordinal GetWindowSubclass(long ptr long ptr)
|
||||
412 stdcall -ordinal RemoveWindowSubclass(long ptr long)
|
||||
413 stdcall -ordinal DefSubclassProc(long long long long)
|
||||
414 stdcall -noname MirrorIcon(ptr ptr)
|
||||
415 stdcall -noname DrawTextWrap(long wstr long ptr long) user32.DrawTextW
|
||||
416 stdcall -noname DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW
|
||||
|
@ -279,25 +279,50 @@ static BOOL RegisterWindowClasses(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
START_TEST(subclass)
|
||||
static int init_function_pointers(void)
|
||||
{
|
||||
HMODULE hdll;
|
||||
HMODULE hmod;
|
||||
void *ptr;
|
||||
|
||||
hmod = GetModuleHandleA("comctl32.dll");
|
||||
assert(hmod);
|
||||
|
||||
hdll = GetModuleHandleA("comctl32.dll");
|
||||
assert(hdll);
|
||||
/* Functions have to be loaded by ordinal. Only XP and W2K3 export
|
||||
* them by name.
|
||||
*/
|
||||
pSetWindowSubclass = (void*)GetProcAddress(hdll, (LPSTR)410);
|
||||
pRemoveWindowSubclass = (void*)GetProcAddress(hdll, (LPSTR)412);
|
||||
pDefSubclassProc = (void*)GetProcAddress(hdll, (LPSTR)413);
|
||||
#define MAKEFUNC_ORD(f, ord) (p##f = (void*)GetProcAddress(hmod, (LPSTR)(ord)))
|
||||
MAKEFUNC_ORD(SetWindowSubclass, 410);
|
||||
MAKEFUNC_ORD(RemoveWindowSubclass, 412);
|
||||
MAKEFUNC_ORD(DefSubclassProc, 413);
|
||||
#undef MAKEFUNC_ORD
|
||||
|
||||
if(!pSetWindowSubclass || !pRemoveWindowSubclass || !pDefSubclassProc)
|
||||
{
|
||||
win_skip("SetWindowSubclass and friends are not available\n");
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* test named exports */
|
||||
ptr = GetProcAddress(hmod, "SetWindowSubclass");
|
||||
ok(broken(ptr == 0) || ptr != 0, "expected named export for SetWindowSubclass\n");
|
||||
if(ptr)
|
||||
{
|
||||
#define TESTNAMED(f) \
|
||||
ptr = (void*)GetProcAddress(hmod, #f); \
|
||||
ok(ptr != 0, "expected named export for " #f "\n");
|
||||
TESTNAMED(RemoveWindowSubclass);
|
||||
TESTNAMED(DefSubclassProc);
|
||||
/* GetWindowSubclass exported for V6 only */
|
||||
#undef TESTNAMED
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
START_TEST(subclass)
|
||||
{
|
||||
if(!init_function_pointers()) return;
|
||||
|
||||
if(!RegisterWindowClasses()) assert(0);
|
||||
|
||||
test_subclass();
|
||||
|
Loading…
Reference in New Issue
Block a user