From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/comctl32/tests/misc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/dlls/comctl32/tests/misc.c b/dlls/comctl32/tests/misc.c index bb3f1993a83..6da3a4536de 100644 --- a/dlls/comctl32/tests/misc.c +++ b/dlls/comctl32/tests/misc.c @@ -22,6 +22,7 @@ #include <windows.h> #include <commctrl.h> #include <uxtheme.h> +#include <shlwapi.h>
#include "wine/test.h" #include "v6util.h" @@ -37,6 +38,7 @@ static BOOL (WINAPI * pStr_SetPtrA)(LPSTR, LPCSTR); static INT (WINAPI * pStr_GetPtrW)(LPCWSTR, LPWSTR, INT); static BOOL (WINAPI * pStr_SetPtrW)(LPWSTR, LPCWSTR);
+static HRESULT (WINAPI *pDllGetVersion)(DLLVERSIONINFO *); static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR); static BOOL (WINAPI *pRemoveWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR); static LRESULT (WINAPI *pDefSubclassProc)(HWND, UINT, WPARAM, LPARAM); @@ -92,6 +94,8 @@ static BOOL InitFunctionPtrs(void) COMCTL32_GET_PROC(235, Str_GetPtrW) COMCTL32_GET_PROC(236, Str_SetPtrW)
+ pDllGetVersion = (void *)GetProcAddress(hComctl32, "DllGetVersion"); + return TRUE; }
@@ -108,6 +112,8 @@ static BOOL init_functions_v6(void) COMCTL32_GET_PROC(412, RemoveWindowSubclass) COMCTL32_GET_PROC(413, DefSubclassProc)
+ pDllGetVersion = (void *)GetProcAddress(hComctl32, "DllGetVersion"); + return TRUE; }
@@ -1271,6 +1277,19 @@ static void test_WM_SETFONT(void) DestroyWindow(parent); }
+static void test_version(BOOL v6) +{ + DLLVERSIONINFO info; + HRESULT hr; + + info.cbSize = sizeof(info); + hr = pDllGetVersion(&info); + ok(hr == S_OK, "DllGetVersion failed, hr %#lx.\n", hr); + + todo_wine_if(v6) + ok(info.dwMajorVersion == (v6 ? 6 : 5), "Got unexpected major version %lu.\n", info.dwMajorVersion); +} + START_TEST(misc) { ULONG_PTR ctx_cookie; @@ -1285,6 +1304,7 @@ START_TEST(misc) test_comctl32_classes(FALSE); test_WM_STYLECHANGED(); test_WM_SETFONT(); + test_version(FALSE);
FreeLibrary(hComctl32);
@@ -1301,6 +1321,7 @@ START_TEST(misc) test_WM_SYSCOLORCHANGE(); test_WM_STYLECHANGED(); test_WM_SETFONT(); + test_version(TRUE);
unload_v6_module(ctx_cookie, hCtx); FreeLibrary(hComctl32);