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