Nikolay Sivov : comctl32/listview: XP SP3 comctl32 V6 test workaround.

Alexandre Julliard julliard at winehq.org
Mon Jun 22 09:04:15 CDT 2009


Module: wine
Branch: master
Commit: 358fa6cd98648e97d234c792fadb4c22c45191fc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=358fa6cd98648e97d234c792fadb4c22c45191fc

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sun Jun 21 18:01:11 2009 +0400

comctl32/listview: XP SP3 comctl32 V6 test workaround.

---

 dlls/comctl32/tests/listview.c |   51 ++++++++++++++++++++++++++-------------
 1 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 060171c..6c6a3b8 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -3410,6 +3410,24 @@ static BOOL is_below_comctl_5(void)
     return !ret;
 }
 
+static void unload_v6_module(ULONG_PTR cookie)
+{
+    HANDLE hKernel32;
+    BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR);
+
+    hKernel32 = GetModuleHandleA("kernel32.dll");
+    pDeactivateActCtx = (void*)GetProcAddress(hKernel32, "DeactivateActCtx");
+    if (!pDeactivateActCtx)
+    {
+        win_skip("Activation contexts unsupported\n");
+        return;
+    }
+
+    pDeactivateActCtx(0, cookie);
+
+    DeleteFileA(manifest_name);
+}
+
 static BOOL load_v6_module(ULONG_PTR *pcookie)
 {
     HANDLE hKernel32;
@@ -3421,6 +3439,7 @@ static BOOL load_v6_module(ULONG_PTR *pcookie)
     BOOL ret;
     HANDLE file;
     DWORD written;
+    HWND hwnd;
 
     hKernel32 = GetModuleHandleA("kernel32.dll");
     pCreateActCtxA = (void*)GetProcAddress(hKernel32, "CreateActCtxA");
@@ -3468,26 +3487,24 @@ static BOOL load_v6_module(ULONG_PTR *pcookie)
         win_skip("A problem during context activation occured.\n");
         DeleteFileA(manifest_name);
     }
-
-    return ret;
-}
-
-static void unload_v6_module(ULONG_PTR cookie)
-{
-    HANDLE hKernel32;
-    BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR);
-
-    hKernel32 = GetModuleHandleA("kernel32.dll");
-    pDeactivateActCtx = (void*)GetProcAddress(hKernel32, "DeactivateActCtx");
-    if (!pDeactivateActCtx)
+    else
     {
-        win_skip("Activation contexts unsupported\n");
-        return;
+        /* this is a XP SP3 failure workaround */
+        hwnd = CreateWindowExA(0, WC_LISTVIEW, "foo",
+                               WS_CHILD | WS_BORDER | WS_VISIBLE | LVS_REPORT,
+                               0, 0, 100, 100,
+                               hwndparent, NULL, GetModuleHandleA(NULL), NULL);
+        if (!IsWindow(hwnd))
+        {
+            win_skip("FIXME: failed to create ListView window.\n");
+            unload_v6_module(*pcookie);
+            return FALSE;
+        }
+        else
+            DestroyWindow(hwnd);
     }
 
-    pDeactivateActCtx(0, cookie);
-
-    DeleteFileA(manifest_name);
+    return ret;
 }
 
 static void test_get_set_view(void)




More information about the wine-cvs mailing list