advpack/tests: Free the library after use.
This commit is contained in:
parent
675ed5a9b4
commit
d1a3bad723
|
@ -35,6 +35,7 @@
|
|||
#define REG_VAL_EXISTS(key, value) !RegQueryValueEx(key, value, NULL, NULL, NULL, NULL)
|
||||
#define OPEN_GUID_KEY() !RegOpenKey(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)
|
||||
|
||||
static HMODULE hAdvPack;
|
||||
static HRESULT (WINAPI *pCloseINFEngine)(HINF);
|
||||
static HRESULT (WINAPI *pDelNode)(LPCSTR,DWORD);
|
||||
static HRESULT (WINAPI *pGetVersionFromFile)(LPCSTR,LPDWORD,LPDWORD,BOOL);
|
||||
|
@ -66,7 +67,7 @@ static void get_progfiles_dir(void)
|
|||
|
||||
static BOOL init_function_pointers(void)
|
||||
{
|
||||
HMODULE hAdvPack = LoadLibraryA("advpack.dll");
|
||||
hAdvPack = LoadLibraryA("advpack.dll");
|
||||
|
||||
if (!hAdvPack)
|
||||
return FALSE;
|
||||
|
@ -594,4 +595,6 @@ START_TEST(advpack)
|
|||
setperusersecvalues_test();
|
||||
translateinfstring_test();
|
||||
translateinfstringex_test();
|
||||
|
||||
FreeLibrary(hAdvPack);
|
||||
}
|
||||
|
|
|
@ -560,4 +560,6 @@ START_TEST(files)
|
|||
test_AdvInstallFile();
|
||||
|
||||
delete_test_files();
|
||||
|
||||
FreeLibrary(hAdvPack);
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <advpub.h>
|
||||
#include "wine/test.h"
|
||||
|
||||
static HMODULE hAdvPack;
|
||||
/* function pointers */
|
||||
static HRESULT (WINAPI *pRunSetupCommand)(HWND, LPCSTR, LPCSTR, LPCSTR, LPCSTR, HANDLE*, DWORD, LPVOID);
|
||||
static HRESULT (WINAPI *pLaunchINFSection)(HWND, HINSTANCE, LPSTR, INT);
|
||||
|
@ -32,7 +33,7 @@ static char CURR_DIR[MAX_PATH];
|
|||
|
||||
static BOOL init_function_pointers(void)
|
||||
{
|
||||
HMODULE hAdvPack = LoadLibraryA("advpack.dll");
|
||||
hAdvPack = LoadLibraryA("advpack.dll");
|
||||
if (!hAdvPack)
|
||||
return FALSE;
|
||||
|
||||
|
@ -273,4 +274,6 @@ START_TEST(install)
|
|||
test_RunSetupCommand();
|
||||
test_LaunchINFSection();
|
||||
test_LaunchINFSectionEx();
|
||||
|
||||
FreeLibrary(hAdvPack);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue