Commit 9463dba8 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

tests: Use the explicit LoadLibraryA function.

parent 360afb93
...@@ -495,7 +495,7 @@ static void test_AdvInstallFile(void) ...@@ -495,7 +495,7 @@ static void test_AdvInstallFile(void)
HMODULE hmod; HMODULE hmod;
char destFolder[MAX_PATH]; char destFolder[MAX_PATH];
hmod = LoadLibrary("setupapi.dll"); hmod = LoadLibraryA("setupapi.dll");
if (!hmod) if (!hmod)
{ {
skip("setupapi.dll not present\n"); skip("setupapi.dll not present\n");
......
...@@ -105,7 +105,7 @@ static void test_ApphelpCheckShellObject(void) ...@@ -105,7 +105,7 @@ static void test_ApphelpCheckShellObject(void)
START_TEST(apphelp) START_TEST(apphelp)
{ {
hdll = LoadLibrary("apphelp.dll"); hdll = LoadLibraryA("apphelp.dll");
if (!hdll) { if (!hdll) {
win_skip("apphelp.dll not available\n"); win_skip("apphelp.dll not available\n");
return; return;
......
...@@ -1217,7 +1217,7 @@ static void test_shell_imagelist(void) ...@@ -1217,7 +1217,7 @@ static void test_shell_imagelist(void)
int cx, cy; int cx, cy;
/* Try to load function from shell32 */ /* Try to load function from shell32 */
hShell32 = LoadLibrary("shell32.dll"); hShell32 = LoadLibraryA("shell32.dll");
pSHGetImageList = (void*)GetProcAddress(hShell32, (LPCSTR) 727); pSHGetImageList = (void*)GetProcAddress(hShell32, (LPCSTR) 727);
if (!pSHGetImageList) if (!pSHGetImageList)
......
...@@ -95,7 +95,7 @@ START_TEST(ddrawex) ...@@ -95,7 +95,7 @@ START_TEST(ddrawex)
IClassFactory *classfactory = NULL; IClassFactory *classfactory = NULL;
ULONG ref; ULONG ref;
HRESULT hr; HRESULT hr;
HMODULE hmod = LoadLibrary("ddrawex.dll"); HMODULE hmod = LoadLibraryA("ddrawex.dll");
if(hmod == NULL) { if(hmod == NULL) {
skip("Failed to load ddrawex.dll\n"); skip("Failed to load ddrawex.dll\n");
return; return;
......
...@@ -408,7 +408,7 @@ START_TEST(surface) ...@@ -408,7 +408,7 @@ START_TEST(surface)
IClassFactory *classfactory = NULL; IClassFactory *classfactory = NULL;
ULONG ref; ULONG ref;
HRESULT hr; HRESULT hr;
HMODULE hmod = LoadLibrary("ddrawex.dll"); HMODULE hmod = LoadLibraryA("ddrawex.dll");
if(hmod == NULL) { if(hmod == NULL) {
skip("Failed to load ddrawex.dll\n"); skip("Failed to load ddrawex.dll\n");
return; return;
......
...@@ -759,7 +759,7 @@ START_TEST(capture) ...@@ -759,7 +759,7 @@ START_TEST(capture)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (!hDsound) { if (!hDsound) {
skip("dsound.dll not found - skipping all tests\n"); skip("dsound.dll not found - skipping all tests\n");
return; return;
......
...@@ -1323,7 +1323,7 @@ START_TEST(ds3d) ...@@ -1323,7 +1323,7 @@ START_TEST(ds3d)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
......
...@@ -1146,7 +1146,7 @@ START_TEST(ds3d8) ...@@ -1146,7 +1146,7 @@ START_TEST(ds3d8)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
......
...@@ -1646,7 +1646,7 @@ START_TEST(dsound) ...@@ -1646,7 +1646,7 @@ START_TEST(dsound)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
BOOL ret; BOOL ret;
...@@ -1655,7 +1655,7 @@ START_TEST(dsound) ...@@ -1655,7 +1655,7 @@ START_TEST(dsound)
ok( ret, "FreeLibrary(1) returned %d\n", GetLastError()); ok( ret, "FreeLibrary(1) returned %d\n", GetLastError());
} }
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
......
...@@ -1176,7 +1176,7 @@ START_TEST(dsound8) ...@@ -1176,7 +1176,7 @@ START_TEST(dsound8)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
......
...@@ -340,7 +340,7 @@ START_TEST(duplex) ...@@ -340,7 +340,7 @@ START_TEST(duplex)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
......
...@@ -722,7 +722,7 @@ START_TEST(propset) ...@@ -722,7 +722,7 @@ START_TEST(propset)
CoInitialize(NULL); CoInitialize(NULL);
hDsound = LoadLibrary("dsound.dll"); hDsound = LoadLibraryA("dsound.dll");
if (hDsound) if (hDsound)
{ {
......
...@@ -375,7 +375,7 @@ static void test_Loader(void) ...@@ -375,7 +375,7 @@ static void test_Loader(void)
CloseHandle(hfile); CloseHandle(hfile);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hlib = LoadLibrary(dll_name); hlib = LoadLibraryA(dll_name);
if (hlib) if (hlib)
{ {
MEMORY_BASIC_INFORMATION info; MEMORY_BASIC_INFORMATION info;
...@@ -701,7 +701,7 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL ...@@ -701,7 +701,7 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL
UnmapViewOfFile(addr2); UnmapViewOfFile(addr2);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
addr2 = LoadLibrary(dll_name); addr2 = LoadLibraryA(dll_name);
if (is_dll) if (is_dll)
{ {
ok(!addr2, "LoadLibrary should fail, is_dll %d\n", is_dll); ok(!addr2, "LoadLibrary should fail, is_dll %d\n", is_dll);
...@@ -983,7 +983,7 @@ static void test_section_access(void) ...@@ -983,7 +983,7 @@ static void test_section_access(void)
CloseHandle(hfile); CloseHandle(hfile);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hlib = LoadLibrary(dll_name); hlib = LoadLibraryA(dll_name);
ok(hlib != 0, "LoadLibrary error %d\n", GetLastError()); ok(hlib != 0, "LoadLibrary error %d\n", GetLastError());
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
...@@ -1364,7 +1364,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param) ...@@ -1364,7 +1364,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
handle = GetModuleHandle("winver.exe"); handle = GetModuleHandle("winver.exe");
ok(!handle, "winver.exe shouldn't be loaded yet\n"); ok(!handle, "winver.exe shouldn't be loaded yet\n");
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
handle = LoadLibrary("winver.exe"); handle = LoadLibraryA("winver.exe");
ok(handle != 0, "LoadLibrary error %d\n", GetLastError()); ok(handle != 0, "LoadLibrary error %d\n", GetLastError());
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = FreeLibrary(handle); ret = FreeLibrary(handle);
...@@ -1491,7 +1491,7 @@ static void child_process(const char *dll_name, DWORD target_offset) ...@@ -1491,7 +1491,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
CloseHandle(file); CloseHandle(file);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hmod = LoadLibrary(dll_name); hmod = LoadLibraryA(dll_name);
ok(hmod != 0, "LoadLibrary error %d\n", GetLastError()); ok(hmod != 0, "LoadLibrary error %d\n", GetLastError());
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
...@@ -2232,7 +2232,7 @@ static void test_ResolveDelayLoadedAPI(void) ...@@ -2232,7 +2232,7 @@ static void test_ResolveDelayLoadedAPI(void)
ULONG size; ULONG size;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hlib = LoadLibrary(td[i]); hlib = LoadLibraryA(td[i]);
ok(hlib != NULL, "LoadLibrary error %u\n", GetLastError()); ok(hlib != NULL, "LoadLibrary error %u\n", GetLastError());
if (!hlib) if (!hlib)
{ {
...@@ -2261,7 +2261,7 @@ static void test_ResolveDelayLoadedAPI(void) ...@@ -2261,7 +2261,7 @@ static void test_ResolveDelayLoadedAPI(void)
itdn = RVAToAddr(delaydir->ImportNameTableRVA, hlib); itdn = RVAToAddr(delaydir->ImportNameTableRVA, hlib);
itda = RVAToAddr(delaydir->ImportAddressTableRVA, hlib); itda = RVAToAddr(delaydir->ImportAddressTableRVA, hlib);
htarget = LoadLibrary(RVAToAddr(delaydir->DllNameRVA, hlib)); htarget = LoadLibraryA(RVAToAddr(delaydir->DllNameRVA, hlib));
for (j = 0; itdn[j].u1.Ordinal; j++) for (j = 0; itdn[j].u1.Ordinal; j++)
{ {
void *ret, *load; void *ret, *load;
......
...@@ -54,7 +54,7 @@ static char* (__cdecl *p_asctime)(const struct tm *); ...@@ -54,7 +54,7 @@ static char* (__cdecl *p_asctime)(const struct tm *);
static void init(void) static void init(void)
{ {
HMODULE hmod = LoadLibrary("msvcrt.dll"); HMODULE hmod = LoadLibraryA("msvcrt.dll");
p_gmtime32 = (void*)GetProcAddress(hmod, "_gmtime32"); p_gmtime32 = (void*)GetProcAddress(hmod, "_gmtime32");
p_gmtime = (void*)GetProcAddress(hmod, "gmtime"); p_gmtime = (void*)GetProcAddress(hmod, "gmtime");
......
...@@ -76,7 +76,7 @@ static void test_get(void) ...@@ -76,7 +76,7 @@ static void test_get(void)
START_TEST(ds) START_TEST(ds)
{ {
HMODULE hnetapi32 = LoadLibrary("netapi32.dll"); HMODULE hnetapi32 = LoadLibraryA("netapi32.dll");
pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation"); pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation");
if (pDsRoleGetPrimaryDomainInformation) if (pDsRoleGetPrimaryDomainInformation)
......
...@@ -7415,7 +7415,7 @@ START_TEST( editor ) ...@@ -7415,7 +7415,7 @@ START_TEST( editor )
BOOL ret; BOOL ret;
/* Must explicitly LoadLibrary(). The test has no references to functions in /* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED20.DLL, so the linker doesn't actually link to it. */ * RICHED20.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); hmoduleRichEdit = LoadLibraryA("riched20.dll");
ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
test_WM_CHAR(); test_WM_CHAR();
......
...@@ -335,7 +335,7 @@ START_TEST(richole) ...@@ -335,7 +335,7 @@ START_TEST(richole)
{ {
/* Must explicitly LoadLibrary(). The test has no references to functions in /* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED20.DLL, so the linker doesn't actually link to it. */ * RICHED20.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); hmoduleRichEdit = LoadLibraryA("riched20.dll");
ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
test_Interfaces(); test_Interfaces();
......
...@@ -882,7 +882,7 @@ START_TEST( txtsrv ) ...@@ -882,7 +882,7 @@ START_TEST( txtsrv )
/* Must explicitly LoadLibrary(). The test has no references to functions in /* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED20.DLL, so the linker doesn't actually link to it. */ * RICHED20.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit = LoadLibrary("RICHED20.DLL"); hmoduleRichEdit = LoadLibraryA("riched20.dll");
ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
pIID_ITextServices = (IID*)GetProcAddress(hmoduleRichEdit, "IID_ITextServices"); pIID_ITextServices = (IID*)GetProcAddress(hmoduleRichEdit, "IID_ITextServices");
......
...@@ -1208,7 +1208,7 @@ START_TEST( editor ) ...@@ -1208,7 +1208,7 @@ START_TEST( editor )
/* Must explicitly LoadLibrary(). The test has no references to functions in /* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED32.DLL, so the linker doesn't actually link to it. */ * RICHED32.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit = LoadLibrary("RICHED32.DLL"); hmoduleRichEdit = LoadLibraryA("riched32.dll");
ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError()); ok(hmoduleRichEdit != NULL, "error: %d\n", (int) GetLastError());
test_WM_SETTEXT(); test_WM_SETTEXT();
......
...@@ -683,7 +683,7 @@ START_TEST(istream) ...@@ -683,7 +683,7 @@ START_TEST(istream)
int i, j, k; int i, j, k;
hShlwapi = LoadLibrary("shlwapi.dll"); hShlwapi = LoadLibraryA("shlwapi.dll");
pSHCreateStreamOnFileA = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileA"); pSHCreateStreamOnFileA = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileA");
pSHCreateStreamOnFileW = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileW"); pSHCreateStreamOnFileW = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileW");
......
...@@ -63,7 +63,7 @@ static struct IUnknownVtbl aggregator_vtbl = ...@@ -63,7 +63,7 @@ static struct IUnknownVtbl aggregator_vtbl =
static BOOL init_function_pointers(void) static BOOL init_function_pointers(void)
{ {
sti_dll = LoadLibrary("sti.dll"); sti_dll = LoadLibraryA("sti.dll");
if (sti_dll) if (sti_dll)
{ {
pStiCreateInstance = (void*) pStiCreateInstance = (void*)
......
...@@ -1171,7 +1171,7 @@ static void test_Input_unicode(void) ...@@ -1171,7 +1171,7 @@ static void test_Input_unicode(void)
return; return;
} }
hModuleImm32 = LoadLibrary("imm32.dll"); hModuleImm32 = LoadLibraryA("imm32.dll");
if (hModuleImm32) { if (hModuleImm32) {
pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME"); pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME");
if (pImmDisableIME) if (pImmDisableIME)
......
...@@ -14279,7 +14279,7 @@ START_TEST(msg) ...@@ -14279,7 +14279,7 @@ START_TEST(msg)
init_procs(); init_procs();
hModuleImm32 = LoadLibrary("imm32.dll"); hModuleImm32 = LoadLibraryA("imm32.dll");
if (hModuleImm32) { if (hModuleImm32) {
pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME"); pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME");
if (pImmDisableIME) if (pImmDisableIME)
......
...@@ -2761,7 +2761,7 @@ static void test_DeviceCapabilities(void) ...@@ -2761,7 +2761,7 @@ static void test_DeviceCapabilities(void)
INT n_papers, n_paper_size, n_paper_names, n_copies, ret; INT n_papers, n_paper_size, n_paper_names, n_copies, ret;
DWORD fields; DWORD fields;
hComdlg32 = LoadLibrary("comdlg32.dll"); hComdlg32 = LoadLibraryA("comdlg32.dll");
assert(hComdlg32); assert(hComdlg32);
pPrintDlgA = (void *)GetProcAddress(hComdlg32, "PrintDlgA"); pPrintDlgA = (void *)GetProcAddress(hComdlg32, "PrintDlgA");
assert(pPrintDlgA); assert(pPrintDlgA);
...@@ -2993,7 +2993,7 @@ todo_wine ...@@ -2993,7 +2993,7 @@ todo_wine
START_TEST(info) START_TEST(info)
{ {
hwinspool = LoadLibrary("winspool.drv"); hwinspool = LoadLibraryA("winspool.drv");
pAddPortExA = (void *) GetProcAddress(hwinspool, "AddPortExA"); pAddPortExA = (void *) GetProcAddress(hwinspool, "AddPortExA");
pEnumPrinterDriversW = (void *) GetProcAddress(hwinspool, "EnumPrinterDriversW"); pEnumPrinterDriversW = (void *) GetProcAddress(hwinspool, "EnumPrinterDriversW");
pGetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "GetDefaultPrinterA"); pGetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "GetDefaultPrinterA");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment