Fix comctl32 tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog
    DPA_Create is exported by ordinal only, do not import it by name.

Index: dlls/comctl32/tests/dpa.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/tests/dpa.c,v
retrieving revision 1.1
diff -u -r1.1 dpa.c
--- dlls/comctl32/tests/dpa.c	15 May 2003 23:58:48 -0000	1.1
+++ dlls/comctl32/tests/dpa.c	31 Aug 2003 23:15:28 -0000
@@ -23,6 +23,8 @@
 
 #include "wine/test.h"
 
+typedef HDPA WINAPI (*tDPA_Create)(int);
+
 static INT CALLBACK dpa_strcmp(LPVOID pvstr1, LPVOID pvstr2, LPARAM flags)
 {
   LPCSTR str1 = (LPCSTR)pvstr1;
@@ -36,19 +38,25 @@
   HDPA dpa_ret;
   INT  int_ret;
   CHAR test_str0[]="test0";
-  
-  dpa_ret = DPA_Create(0);
-  ok((dpa_ret !=0), "DPA_Create failed");
+  HMODULE comctl32;
+  tDPA_Create pDPA_Create;
+ 
+  comctl32 = LoadLibrary("comctl32");
+  ok((comctl32 != 0), "Can't load comctl32");
+  pDPA_Create = (tDPA_Create)GetProcAddress(comctl32, (LPCSTR)(LONG)328);
+  ok((pDPA_Create != 0), "Can't load DPA_Create");
+  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);
   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);
   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);
   ok((int_ret == 0), "DPA_Search proposed bad item");
+  FreeLibrary(comctl32);
 }
 
 START_TEST(dpa)
 {
     DPA_test();
-    
 }


-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux