Why is this not applied?

Would be nice to have when cross compiling works.


Hans Leidekker wrote:


Hi,

It appears that the comctl32 conformance test calls functions by name that are exported by ordinal only on Windows. Still the test runs (and
thus run-time links) on Wine. Is this wanted behavior?


When I run it as a cross compiled test on my W2kSP4 machine or on Wine(!)
it bombs with linking errors. To fix this I made this patch that uses GetProcAddress to get at the functions via their ordinals.


-Hans

Changelog:
 Don't call functions by name. They are exported by ordinal only.


Index: dlls/comctl32/tests/dpa.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/tests/dpa.c,v retrieving revision 1.2 diff -u -r1.2 dpa.c --- dlls/comctl32/tests/dpa.c 5 Sep 2003 23:08:42 -0000 1.2 +++ dlls/comctl32/tests/dpa.c 19 Oct 2003 16:24:49 -0000 @@ -29,6 +29,9 @@

#include "wine/test.h"

+static HDPA (WINAPI *pDPA_Create)(INT)=NULL;
+static INT (WINAPI *pDPA_Search)(HDPA,LPVOID,INT,PFNDPACOMPARE,LPARAM,UINT)=NULL;
+
static INT CALLBACK dpa_strcmp(LPVOID pvstr1, LPVOID pvstr2, LPARAM flags)
{
LPCSTR str1 = (LPCSTR)pvstr1;
@@ -42,14 +45,18 @@
HDPA dpa_ret;
INT int_ret;
CHAR test_str0[]="test0";
- - dpa_ret = DPA_Create(0);
+
+ HMODULE hcomctl32=LoadLibraryA("comctl32.dll");
+ pDPA_Create=(void*)GetProcAddress(hcomctl32, (LPSTR)328);
+ pDPA_Search=(void*)GetProcAddress(hcomctl32, (LPSTR)339);
+
+ dpa_ret = pDPA_Create(0);
ok((dpa_ret !=0), "DPA_Create failed");
- int_ret = DPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED);
+ int_ret = pDPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED);
ok((int_ret == -1), "DPA_Search found invalid item");
- int_ret = DPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED|DPAS_INSERTBEFORE);
+ int_ret = pDPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED|DPAS_INSERTBEFORE);
ok((int_ret == 0), "DPA_Search proposed bad item");
- int_ret = DPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED|DPAS_INSERTAFTER);
+ int_ret = pDPA_Search(dpa_ret,test_str0,0, dpa_strcmp,0, DPAS_SORTED|DPAS_INSERTAFTER);
ok((int_ret == 0), "DPA_Search proposed bad item");
}











Reply via email to