Module: wine Branch: master Commit: a839e2ec4572dad3b790f20a925adcab0e4875b9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a839e2ec4572dad3b790f20a92...
Author: Jacek Caban jacek@codeweavers.com Date: Sun Oct 10 15:11:22 2010 +0200
shlwapi: Skip more tests on too old shlwapi.dll.
---
dlls/shlwapi/tests/clist.c | 13 +++++++++++-- dlls/shlwapi/tests/clsid.c | 7 +++++++ dlls/shlwapi/tests/ordinal.c | 6 ++++++ dlls/shlwapi/tests/path.c | 6 ++++++ dlls/shlwapi/tests/shreg.c | 7 +++++++ 5 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/dlls/shlwapi/tests/clist.c b/dlls/shlwapi/tests/clist.c index 3b979fd..0c1704d 100644 --- a/dlls/shlwapi/tests/clist.c +++ b/dlls/shlwapi/tests/clist.c @@ -212,10 +212,16 @@ static HRESULT (WINAPI *pSHLWAPI_213)(_IDummyStream*); static HRESULT (WINAPI *pSHLWAPI_214)(_IDummyStream*,ULARGE_INTEGER*);
-static void InitFunctionPtrs(void) +static BOOL InitFunctionPtrs(void) { SHLWAPI_hshlwapi = GetModuleHandleA("shlwapi.dll");
+ /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */ + if(!GetProcAddress(SHLWAPI_hshlwapi, "SHCreateStreamOnFileEx")){ + win_skip("Too old shlwapi version\n"); + return FALSE; + } + pSHLWAPI_17 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)17); ok(pSHLWAPI_17 != 0, "No Ordinal 17\n"); pSHLWAPI_18 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)18); @@ -238,6 +244,8 @@ static void InitFunctionPtrs(void) ok(pSHLWAPI_213 != 0, "No Ordinal 213\n"); pSHLWAPI_214 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)214); ok(pSHLWAPI_214 != 0, "No Ordinal 214\n"); + + return TRUE; }
static void InitDummyStream(_IDummyStream* iface) @@ -623,7 +631,8 @@ static void test_SHLWAPI_214(void)
START_TEST(clist) { - InitFunctionPtrs(); + if(!InitFunctionPtrs()) + return;
test_CList();
diff --git a/dlls/shlwapi/tests/clsid.c b/dlls/shlwapi/tests/clsid.c index 85550fc..ed37c79 100644 --- a/dlls/shlwapi/tests/clsid.c +++ b/dlls/shlwapi/tests/clsid.c @@ -185,6 +185,13 @@ static void test_CLSIDFromProgIDWrap(void) START_TEST(clsid) { hShlwapi = GetModuleHandleA("shlwapi.dll"); + + /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */ + if(!GetProcAddress(hShlwapi, "SHCreateStreamOnFileEx")){ + win_skip("Too old shlwapi version\n"); + return; + } + pSHLWAPI_269 = (void*)GetProcAddress(hShlwapi, (LPSTR)269); pSHLWAPI_23 = (void*)GetProcAddress(hShlwapi, (LPSTR)23);
diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c index 7b02031..dfee9bf 100644 --- a/dlls/shlwapi/tests/ordinal.c +++ b/dlls/shlwapi/tests/ordinal.c @@ -2770,6 +2770,12 @@ START_TEST(ordinal) is_win2k_and_lower = GetProcAddress(hShlwapi, "StrChrNW") == 0; is_win9x = GetProcAddress(hShlwapi, (LPSTR)99) == 0; /* StrCpyNXA */
+ /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */ + if(!GetProcAddress(hShlwapi, "SHCreateStreamOnFileEx")){ + win_skip("Too old shlwapi version\n"); + return; + } + init_pointers();
hmlang = LoadLibraryA("mlang.dll"); diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c index 9b4b15e..e5f5c7c 100644 --- a/dlls/shlwapi/tests/path.c +++ b/dlls/shlwapi/tests/path.c @@ -1362,6 +1362,12 @@ START_TEST(path) { HMODULE hShlwapi = GetModuleHandleA("shlwapi.dll");
+ /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */ + if(!GetProcAddress(hShlwapi, "SHCreateStreamOnFileEx")){ + win_skip("Too old shlwapi version\n"); + return; + } + pPathCreateFromUrlA = (void*)GetProcAddress(hShlwapi, "PathCreateFromUrlA"); pPathCreateFromUrlW = (void*)GetProcAddress(hShlwapi, "PathCreateFromUrlW"); pPathCombineW = (void*)GetProcAddress(hShlwapi, "PathCombineW"); diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c index 5fb3dac..11ebae9 100644 --- a/dlls/shlwapi/tests/shreg.c +++ b/dlls/shlwapi/tests/shreg.c @@ -452,6 +452,13 @@ START_TEST(shreg) if (!hkey) return;
hshlwapi = GetModuleHandleA("shlwapi.dll"); + + /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */ + if(!GetProcAddress(hshlwapi, "SHCreateStreamOnFileEx")){ + win_skip("Too old shlwapi version\n"); + return; + } + pSHCopyKeyA=(SHCopyKeyA_func)GetProcAddress(hshlwapi,"SHCopyKeyA"); pSHRegGetPathA=(SHRegGetPathA_func)GetProcAddress(hshlwapi,"SHRegGetPathA"); pSHRegGetValueA=(SHRegGetValueA_func)GetProcAddress(hshlwapi,"SHRegGetValueA");