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

This commit is contained in:
Jacek Caban 2010-10-10 15:11:22 +02:00 committed by Alexandre Julliard
parent f896b5eb6d
commit a839e2ec45
5 changed files with 37 additions and 2 deletions

View file

@ -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();

View file

@ -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);

View file

@ -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");

View file

@ -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");

View file

@ -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");