diff --git a/dlls/msvcp100/tests/misc.c b/dlls/msvcp100/tests/misc.c index 554db2e2e07..7775888a8e7 100644 --- a/dlls/msvcp100/tests/misc.c +++ b/dlls/msvcp100/tests/misc.c @@ -93,11 +93,12 @@ static void init_thiscall_thunk(void) #endif /* __i386__ */ +static HMODULE msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcp = LoadLibraryA("msvcp100.dll"); + msvcp = LoadLibraryA("msvcp100.dll"); if(!msvcp) { win_skip("msvcp100.dll not installed\n"); return FALSE; @@ -200,4 +201,6 @@ START_TEST(misc) return; test__Container_base12(); + + FreeLibrary(msvcp); } diff --git a/dlls/msvcp100/tests/string.c b/dlls/msvcp100/tests/string.c index 5fb2003aedc..eb02bc557ee 100644 --- a/dlls/msvcp100/tests/string.c +++ b/dlls/msvcp100/tests/string.c @@ -83,11 +83,12 @@ static void (__thiscall *_Yarn_char_dtor)(_Yarn_char *this); static const char* (__thiscall *_Yarn_char_c_str)(const _Yarn_char *this); static char (__thiscall *_Yarn_char_empty)(const _Yarn_char *this); +static HMODULE msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcp = LoadLibraryA("msvcp100.dll"); + msvcp = LoadLibraryA("msvcp100.dll"); if(!msvcp) { win_skip("msvcp100.dll not installed\n"); return FALSE; @@ -173,4 +174,6 @@ START_TEST(string) return; test__Yarn_char(); + + FreeLibrary(msvcp); } diff --git a/dlls/msvcp60/tests/ios.c b/dlls/msvcp60/tests/ios.c index 2a8b966c056..cf0fa19dbf6 100644 --- a/dlls/msvcp60/tests/ios.c +++ b/dlls/msvcp60/tests/ios.c @@ -565,11 +565,12 @@ static void init_thiscall_thunk(void) #endif /* __i386__ */ +static HMODULE msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcp = LoadLibraryA("msvcp60.dll"); + msvcp = LoadLibraryA("msvcp60.dll"); if(!msvcp) { win_skip("msvcp60.dll not installed\n"); return FALSE; @@ -1651,4 +1652,6 @@ START_TEST(ios) test_istream_tellg(); test_istream_getline(); test_ostream_print_ushort(); + + FreeLibrary(msvcp); } diff --git a/dlls/msvcp60/tests/string.c b/dlls/msvcp60/tests/string.c index 6d3ab1a5cc0..3ed148098de 100644 --- a/dlls/msvcp60/tests/string.c +++ b/dlls/msvcp60/tests/string.c @@ -149,11 +149,12 @@ static void init_thiscall_thunk(void) #endif /* __i386__ */ +static HMODULE msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcp = LoadLibraryA("msvcp60.dll"); + msvcp = LoadLibraryA("msvcp60.dll"); if(!msvcp) { win_skip("msvcp60.dll not installed\n"); return FALSE; @@ -701,4 +702,6 @@ START_TEST(string) test_basic_string_char_replace(); test_basic_string_wchar(); test_basic_string_wchar_swap(); + + FreeLibrary(msvcp); } diff --git a/dlls/msvcp90/tests/ios.c b/dlls/msvcp90/tests/ios.c index dc70c3f2829..76107b02c99 100644 --- a/dlls/msvcp90/tests/ios.c +++ b/dlls/msvcp90/tests/ios.c @@ -590,12 +590,13 @@ static void init_thiscall_thunk(void) #endif /* __i386__ */ +static HMODULE msvcr, msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcr = LoadLibraryA("msvcr90.dll"); - HMODULE msvcp = LoadLibraryA("msvcp90.dll"); + msvcr = LoadLibraryA("msvcr90.dll"); + msvcp = LoadLibraryA("msvcp90.dll"); if(!msvcr || !msvcp) { win_skip("msvcp90.dll or msvcrt90.dll not installed\n"); return FALSE; @@ -1969,4 +1970,7 @@ START_TEST(ios) test_ostream_print_ushort(); ok(!invalid_parameter, "invalid_parameter_handler was invoked too many times\n"); + + FreeLibrary(msvcr); + FreeLibrary(msvcp); } diff --git a/dlls/msvcp90/tests/misc.c b/dlls/msvcp90/tests/misc.c index f294b2ad268..e94ddcb0436 100644 --- a/dlls/msvcp90/tests/misc.c +++ b/dlls/msvcp90/tests/misc.c @@ -183,12 +183,13 @@ static void init_thiscall_thunk(void) #endif /* __i386__ */ +static HMODULE msvcr, msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcr = LoadLibraryA("msvcr90.dll"); - HMODULE msvcp = LoadLibraryA("msvcp90.dll"); + msvcr = LoadLibraryA("msvcr90.dll"); + msvcp = LoadLibraryA("msvcp90.dll"); if(!msvcr || !msvcp) { win_skip("msvcp90.dll or msvcrt90.dll not installed\n"); return FALSE; @@ -863,4 +864,7 @@ START_TEST(misc) test_complex(); ok(!invalid_parameter, "invalid_parameter_handler was invoked too many times\n"); + + FreeLibrary(msvcr); + FreeLibrary(msvcp); } diff --git a/dlls/msvcp90/tests/string.c b/dlls/msvcp90/tests/string.c index 6cc06ce5af5..f1aa92a66d9 100644 --- a/dlls/msvcp90/tests/string.c +++ b/dlls/msvcp90/tests/string.c @@ -170,12 +170,13 @@ static void init_thiscall_thunk(void) #endif /* __i386__ */ +static HMODULE msvcr, msvcp; #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y) #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0) static BOOL init(void) { - HMODULE msvcr = LoadLibraryA("msvcr90.dll"); - HMODULE msvcp = LoadLibraryA("msvcp90.dll"); + msvcr = LoadLibraryA("msvcr90.dll"); + msvcp = LoadLibraryA("msvcp90.dll"); if(!msvcr || !msvcp) { win_skip("msvcp90.dll or msvcrt90.dll not installed\n"); return FALSE; @@ -784,4 +785,7 @@ START_TEST(string) test_basic_string_char_find_last_not_of(); ok(!invalid_parameter, "invalid_parameter_handler was invoked too many times\n"); + + FreeLibrary(msvcr); + FreeLibrary(msvcp); }