shlwapi/tests: Use GetModuleHandleA instead of LoadLibraryA.
This commit is contained in:
parent
d00d54ebeb
commit
3de1c55dc6
@ -214,10 +214,8 @@ static HRESULT (WINAPI *pSHLWAPI_214)(_IDummyStream*,ULARGE_INTEGER*);
|
||||
|
||||
static void InitFunctionPtrs(void)
|
||||
{
|
||||
SHLWAPI_hshlwapi = LoadLibraryA("shlwapi.dll");
|
||||
ok(SHLWAPI_hshlwapi != 0, "LoadLibrary failed\n");
|
||||
if (SHLWAPI_hshlwapi)
|
||||
{
|
||||
SHLWAPI_hshlwapi = GetModuleHandleA("shlwapi.dll");
|
||||
|
||||
pSHLWAPI_17 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)17);
|
||||
ok(pSHLWAPI_17 != 0, "No Ordinal 17\n");
|
||||
pSHLWAPI_18 = (void *)GetProcAddress( SHLWAPI_hshlwapi, (LPSTR)18);
|
||||
@ -240,7 +238,6 @@ 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");
|
||||
}
|
||||
}
|
||||
|
||||
static void InitDummyStream(_IDummyStream* iface)
|
||||
@ -637,7 +634,4 @@ START_TEST(clist)
|
||||
test_SHLWAPI_213();
|
||||
test_SHLWAPI_214();
|
||||
}
|
||||
|
||||
if (SHLWAPI_hshlwapi)
|
||||
FreeLibrary(SHLWAPI_hshlwapi);
|
||||
}
|
||||
|
@ -182,17 +182,10 @@ static void test_CLSIDFromProgIDWrap(void)
|
||||
|
||||
START_TEST(clsid)
|
||||
{
|
||||
hShlwapi = LoadLibraryA("shlwapi.dll");
|
||||
ok(hShlwapi != 0, "LoadLibraryA failed\n");
|
||||
if (hShlwapi)
|
||||
{
|
||||
hShlwapi = GetModuleHandleA("shlwapi.dll");
|
||||
pSHLWAPI_269 = (void*)GetProcAddress(hShlwapi, (LPSTR)269);
|
||||
pSHLWAPI_23 = (void*)GetProcAddress(hShlwapi, (LPSTR)23);
|
||||
}
|
||||
|
||||
test_ClassIDs();
|
||||
test_CLSIDFromProgIDWrap();
|
||||
|
||||
if (hShlwapi)
|
||||
FreeLibrary(hShlwapi);
|
||||
}
|
||||
|
@ -433,10 +433,7 @@ static void test_GetShellSecurityDescriptor(void)
|
||||
|
||||
START_TEST(ordinal)
|
||||
{
|
||||
hShlwapi = LoadLibraryA("shlwapi.dll");
|
||||
ok(hShlwapi != 0, "LoadLibraryA failed\n");
|
||||
if (!hShlwapi)
|
||||
return;
|
||||
hShlwapi = GetModuleHandleA("shlwapi.dll");
|
||||
|
||||
pGetAcceptLanguagesA = (void*)GetProcAddress(hShlwapi, (LPSTR)14);
|
||||
pSHSearchMapInt = (void*)GetProcAddress(hShlwapi, (LPSTR)198);
|
||||
@ -450,6 +447,4 @@ START_TEST(ordinal)
|
||||
test_alloc_shared();
|
||||
test_fdsa();
|
||||
test_GetShellSecurityDescriptor();
|
||||
|
||||
FreeLibrary(hShlwapi);
|
||||
}
|
||||
|
@ -1833,8 +1833,7 @@ static void test_PathUnquoteSpaces(void)
|
||||
|
||||
START_TEST(path)
|
||||
{
|
||||
hShlwapi = LoadLibraryA("shlwapi.dll");
|
||||
if (!hShlwapi) return;
|
||||
hShlwapi = GetModuleHandleA("shlwapi.dll");
|
||||
|
||||
test_UrlHash();
|
||||
test_UrlGetPart();
|
||||
|
Loading…
x
Reference in New Issue
Block a user