Commit a839e2ec authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

shlwapi: Skip more tests on too old shlwapi.dll.

parent f896b5eb
......@@ -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();
......
......@@ -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);
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment