[PATCH 1/7] tests: Use the explicit LoadLibraryA function.

Michael Stefaniuc mstefani at redhat.de
Tue Oct 1 16:09:53 CDT 2013


---
 dlls/advpack/tests/files.c      |  2 +-
 dlls/apphelp/tests/apphelp.c    |  2 +-
 dlls/comctl32/tests/imagelist.c |  2 +-
 dlls/ddrawex/tests/ddrawex.c    |  2 +-
 dlls/ddrawex/tests/surface.c    |  2 +-
 dlls/dsound/tests/capture.c     |  2 +-
 dlls/dsound/tests/ds3d.c        |  2 +-
 dlls/dsound/tests/ds3d8.c       |  2 +-
 dlls/dsound/tests/dsound.c      |  4 ++--
 dlls/dsound/tests/dsound8.c     |  2 +-
 dlls/dsound/tests/duplex.c      |  2 +-
 dlls/dsound/tests/propset.c     |  2 +-
 dlls/kernel32/tests/loader.c    | 14 +++++++-------
 dlls/msvcrt/tests/time.c        |  2 +-
 dlls/netapi32/tests/ds.c        |  2 +-
 dlls/riched20/tests/editor.c    |  2 +-
 dlls/riched20/tests/richole.c   |  2 +-
 dlls/riched20/tests/txtsrv.c    |  2 +-
 dlls/riched32/tests/editor.c    |  2 +-
 dlls/shlwapi/tests/istream.c    |  2 +-
 dlls/sti/tests/sti.c            |  2 +-
 dlls/user32/tests/input.c       |  2 +-
 dlls/user32/tests/msg.c         |  2 +-
 dlls/winspool.drv/tests/info.c  |  4 ++--
 24 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/dlls/advpack/tests/files.c b/dlls/advpack/tests/files.c
index 4a985be..99021fb 100644
--- a/dlls/advpack/tests/files.c
+++ b/dlls/advpack/tests/files.c
@@ -495,7 +495,7 @@ static void test_AdvInstallFile(void)
     HMODULE hmod;
     char destFolder[MAX_PATH];
 
-    hmod = LoadLibrary("setupapi.dll");
+    hmod = LoadLibraryA("setupapi.dll");
     if (!hmod)
     {
         skip("setupapi.dll not present\n");
diff --git a/dlls/apphelp/tests/apphelp.c b/dlls/apphelp/tests/apphelp.c
index 5b5670c..fb2e3a3 100644
--- a/dlls/apphelp/tests/apphelp.c
+++ b/dlls/apphelp/tests/apphelp.c
@@ -105,7 +105,7 @@ static void test_ApphelpCheckShellObject(void)
 START_TEST(apphelp)
 {
 
-    hdll = LoadLibrary("apphelp.dll");
+    hdll = LoadLibraryA("apphelp.dll");
     if (!hdll) {
         win_skip("apphelp.dll not available\n");
         return;
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index 3e7adbc..cb4d56c 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -1217,7 +1217,7 @@ static void test_shell_imagelist(void)
     int cx, cy;
 
     /* Try to load function from shell32 */
-    hShell32 = LoadLibrary("shell32.dll");
+    hShell32 = LoadLibraryA("shell32.dll");
     pSHGetImageList = (void*)GetProcAddress(hShell32, (LPCSTR) 727);
 
     if (!pSHGetImageList)
diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c
index c07e694..aa31b2f 100644
--- a/dlls/ddrawex/tests/ddrawex.c
+++ b/dlls/ddrawex/tests/ddrawex.c
@@ -95,7 +95,7 @@ START_TEST(ddrawex)
     IClassFactory *classfactory = NULL;
     ULONG ref;
     HRESULT hr;
-    HMODULE hmod = LoadLibrary("ddrawex.dll");
+    HMODULE hmod = LoadLibraryA("ddrawex.dll");
     if(hmod == NULL) {
         skip("Failed to load ddrawex.dll\n");
         return;
diff --git a/dlls/ddrawex/tests/surface.c b/dlls/ddrawex/tests/surface.c
index d81bc4e..c6c02a8 100644
--- a/dlls/ddrawex/tests/surface.c
+++ b/dlls/ddrawex/tests/surface.c
@@ -408,7 +408,7 @@ START_TEST(surface)
     IClassFactory *classfactory = NULL;
     ULONG ref;
     HRESULT hr;
-    HMODULE hmod = LoadLibrary("ddrawex.dll");
+    HMODULE hmod = LoadLibraryA("ddrawex.dll");
     if(hmod == NULL) {
         skip("Failed to load ddrawex.dll\n");
         return;
diff --git a/dlls/dsound/tests/capture.c b/dlls/dsound/tests/capture.c
index af4f691..74889d6 100644
--- a/dlls/dsound/tests/capture.c
+++ b/dlls/dsound/tests/capture.c
@@ -759,7 +759,7 @@ START_TEST(capture)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (!hDsound) {
         skip("dsound.dll not found - skipping all tests\n");
         return;
diff --git a/dlls/dsound/tests/ds3d.c b/dlls/dsound/tests/ds3d.c
index 0caa33d..7682851 100644
--- a/dlls/dsound/tests/ds3d.c
+++ b/dlls/dsound/tests/ds3d.c
@@ -1323,7 +1323,7 @@ START_TEST(ds3d)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
 
diff --git a/dlls/dsound/tests/ds3d8.c b/dlls/dsound/tests/ds3d8.c
index e5db2de..77f6f88 100644
--- a/dlls/dsound/tests/ds3d8.c
+++ b/dlls/dsound/tests/ds3d8.c
@@ -1146,7 +1146,7 @@ START_TEST(ds3d8)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
 
diff --git a/dlls/dsound/tests/dsound.c b/dlls/dsound/tests/dsound.c
index d31dc9c..4be91fb 100644
--- a/dlls/dsound/tests/dsound.c
+++ b/dlls/dsound/tests/dsound.c
@@ -1646,7 +1646,7 @@ START_TEST(dsound)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
         BOOL ret;
@@ -1655,7 +1655,7 @@ START_TEST(dsound)
         ok( ret, "FreeLibrary(1) returned %d\n", GetLastError());
     }
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
 
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
index e22265b..fe5bbe0 100644
--- a/dlls/dsound/tests/dsound8.c
+++ b/dlls/dsound/tests/dsound8.c
@@ -1176,7 +1176,7 @@ START_TEST(dsound8)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
 
diff --git a/dlls/dsound/tests/duplex.c b/dlls/dsound/tests/duplex.c
index b688803..d30cc25 100644
--- a/dlls/dsound/tests/duplex.c
+++ b/dlls/dsound/tests/duplex.c
@@ -340,7 +340,7 @@ START_TEST(duplex)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
 
diff --git a/dlls/dsound/tests/propset.c b/dlls/dsound/tests/propset.c
index 6324a3f..c62c02a 100644
--- a/dlls/dsound/tests/propset.c
+++ b/dlls/dsound/tests/propset.c
@@ -722,7 +722,7 @@ START_TEST(propset)
 
     CoInitialize(NULL);
 
-    hDsound = LoadLibrary("dsound.dll");
+    hDsound = LoadLibraryA("dsound.dll");
     if (hDsound)
     {
 
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c
index 96d57f4..f2bd759 100644
--- a/dlls/kernel32/tests/loader.c
+++ b/dlls/kernel32/tests/loader.c
@@ -375,7 +375,7 @@ static void test_Loader(void)
         CloseHandle(hfile);
 
         SetLastError(0xdeadbeef);
-        hlib = LoadLibrary(dll_name);
+        hlib = LoadLibraryA(dll_name);
         if (hlib)
         {
             MEMORY_BASIC_INFORMATION info;
@@ -701,7 +701,7 @@ static void test_image_mapping(const char *dll_name, DWORD scn_page_access, BOOL
     UnmapViewOfFile(addr2);
 
     SetLastError(0xdeadbeef);
-    addr2 = LoadLibrary(dll_name);
+    addr2 = LoadLibraryA(dll_name);
     if (is_dll)
     {
         ok(!addr2, "LoadLibrary should fail, is_dll %d\n", is_dll);
@@ -983,7 +983,7 @@ static void test_section_access(void)
         CloseHandle(hfile);
 
         SetLastError(0xdeadbeef);
-        hlib = LoadLibrary(dll_name);
+        hlib = LoadLibraryA(dll_name);
         ok(hlib != 0, "LoadLibrary error %d\n", GetLastError());
 
         SetLastError(0xdeadbeef);
@@ -1364,7 +1364,7 @@ static BOOL WINAPI dll_entry_point(HINSTANCE hinst, DWORD reason, LPVOID param)
         handle = GetModuleHandle("winver.exe");
         ok(!handle, "winver.exe shouldn't be loaded yet\n");
         SetLastError(0xdeadbeef);
-        handle = LoadLibrary("winver.exe");
+        handle = LoadLibraryA("winver.exe");
         ok(handle != 0, "LoadLibrary error %d\n", GetLastError());
         SetLastError(0xdeadbeef);
         ret = FreeLibrary(handle);
@@ -1491,7 +1491,7 @@ static void child_process(const char *dll_name, DWORD target_offset)
     CloseHandle(file);
 
     SetLastError(0xdeadbeef);
-    hmod = LoadLibrary(dll_name);
+    hmod = LoadLibraryA(dll_name);
     ok(hmod != 0, "LoadLibrary error %d\n", GetLastError());
 
     SetLastError(0xdeadbeef);
@@ -2232,7 +2232,7 @@ static void test_ResolveDelayLoadedAPI(void)
         ULONG size;
 
         SetLastError(0xdeadbeef);
-        hlib = LoadLibrary(td[i]);
+        hlib = LoadLibraryA(td[i]);
         ok(hlib != NULL, "LoadLibrary error %u\n", GetLastError());
         if (!hlib)
         {
@@ -2261,7 +2261,7 @@ static void test_ResolveDelayLoadedAPI(void)
 
             itdn = RVAToAddr(delaydir->ImportNameTableRVA, 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++)
             {
                 void *ret, *load;
diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c
index 729e359..a3e5c07 100644
--- a/dlls/msvcrt/tests/time.c
+++ b/dlls/msvcrt/tests/time.c
@@ -54,7 +54,7 @@ static char*      (__cdecl *p_asctime)(const struct tm *);
 
 static void init(void)
 {
-    HMODULE hmod = LoadLibrary("msvcrt.dll");
+    HMODULE hmod = LoadLibraryA("msvcrt.dll");
 
     p_gmtime32 = (void*)GetProcAddress(hmod, "_gmtime32");
     p_gmtime = (void*)GetProcAddress(hmod, "gmtime");
diff --git a/dlls/netapi32/tests/ds.c b/dlls/netapi32/tests/ds.c
index be9597d..4b00499 100644
--- a/dlls/netapi32/tests/ds.c
+++ b/dlls/netapi32/tests/ds.c
@@ -76,7 +76,7 @@ static void test_get(void)
 
 START_TEST(ds)
 {
-    HMODULE hnetapi32 = LoadLibrary("netapi32.dll");
+    HMODULE hnetapi32 = LoadLibraryA("netapi32.dll");
 
     pDsRoleGetPrimaryDomainInformation=(void*)GetProcAddress(hnetapi32,"DsRoleGetPrimaryDomainInformation");
     if (pDsRoleGetPrimaryDomainInformation)
diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c
index 15e1132..aae26cb 100644
--- a/dlls/riched20/tests/editor.c
+++ b/dlls/riched20/tests/editor.c
@@ -7376,7 +7376,7 @@ START_TEST( editor )
   BOOL ret;
   /* Must explicitly LoadLibrary(). The test has no references to functions in
    * 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());
 
   test_WM_CHAR();
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
index 1bd0be9..196042b 100644
--- a/dlls/riched20/tests/richole.c
+++ b/dlls/riched20/tests/richole.c
@@ -335,7 +335,7 @@ START_TEST(richole)
 {
   /* Must explicitly LoadLibrary(). The test has no references to functions in
    * 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());
 
   test_Interfaces();
diff --git a/dlls/riched20/tests/txtsrv.c b/dlls/riched20/tests/txtsrv.c
index e517e03..3e88c72 100644
--- a/dlls/riched20/tests/txtsrv.c
+++ b/dlls/riched20/tests/txtsrv.c
@@ -882,7 +882,7 @@ START_TEST( txtsrv )
 
     /* Must explicitly LoadLibrary(). The test has no references to functions in
      * 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());
 
     pIID_ITextServices = (IID*)GetProcAddress(hmoduleRichEdit, "IID_ITextServices");
diff --git a/dlls/riched32/tests/editor.c b/dlls/riched32/tests/editor.c
index 5a031e3..e4f3209 100644
--- a/dlls/riched32/tests/editor.c
+++ b/dlls/riched32/tests/editor.c
@@ -1208,7 +1208,7 @@ START_TEST( editor )
 
   /* Must explicitly LoadLibrary(). The test has no references to functions in
    * 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());
 
   test_WM_SETTEXT();
diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c
index a61e293..097e70a 100644
--- a/dlls/shlwapi/tests/istream.c
+++ b/dlls/shlwapi/tests/istream.c
@@ -683,7 +683,7 @@ START_TEST(istream)
 
     int i, j, k;
 
-    hShlwapi = LoadLibrary("shlwapi.dll");
+    hShlwapi = LoadLibraryA("shlwapi.dll");
 
     pSHCreateStreamOnFileA = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileA");
     pSHCreateStreamOnFileW = (void*)GetProcAddress(hShlwapi, "SHCreateStreamOnFileW");
diff --git a/dlls/sti/tests/sti.c b/dlls/sti/tests/sti.c
index c74f793..9c5e3c7 100644
--- a/dlls/sti/tests/sti.c
+++ b/dlls/sti/tests/sti.c
@@ -63,7 +63,7 @@ static struct IUnknownVtbl aggregator_vtbl =
 
 static BOOL init_function_pointers(void)
 {
-    sti_dll = LoadLibrary("sti.dll");
+    sti_dll = LoadLibraryA("sti.dll");
     if (sti_dll)
     {
         pStiCreateInstance = (void*)
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index cb090dd..f3f5dcc 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -1171,7 +1171,7 @@ static void test_Input_unicode(void)
         return;
     }
 
-    hModuleImm32 = LoadLibrary("imm32.dll");
+    hModuleImm32 = LoadLibraryA("imm32.dll");
     if (hModuleImm32) {
         pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME");
         if (pImmDisableIME)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 87e2817..aab3d12 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -14279,7 +14279,7 @@ START_TEST(msg)
 
     init_procs();
 
-    hModuleImm32 = LoadLibrary("imm32.dll");
+    hModuleImm32 = LoadLibraryA("imm32.dll");
     if (hModuleImm32) {
         pImmDisableIME = (void *)GetProcAddress(hModuleImm32, "ImmDisableIME");
         if (pImmDisableIME)
diff --git a/dlls/winspool.drv/tests/info.c b/dlls/winspool.drv/tests/info.c
index 3990fb8..0f22c47 100644
--- a/dlls/winspool.drv/tests/info.c
+++ b/dlls/winspool.drv/tests/info.c
@@ -2761,7 +2761,7 @@ static void test_DeviceCapabilities(void)
     INT n_papers, n_paper_size, n_paper_names, n_copies, ret;
     DWORD fields;
 
-    hComdlg32 = LoadLibrary("comdlg32.dll");
+    hComdlg32 = LoadLibraryA("comdlg32.dll");
     assert(hComdlg32);
     pPrintDlgA = (void *)GetProcAddress(hComdlg32, "PrintDlgA");
     assert(pPrintDlgA);
@@ -2993,7 +2993,7 @@ todo_wine
 
 START_TEST(info)
 {
-    hwinspool = LoadLibrary("winspool.drv");
+    hwinspool = LoadLibraryA("winspool.drv");
     pAddPortExA = (void *) GetProcAddress(hwinspool, "AddPortExA");
     pEnumPrinterDriversW = (void *) GetProcAddress(hwinspool, "EnumPrinterDriversW");
     pGetDefaultPrinterA = (void *) GetProcAddress(hwinspool, "GetDefaultPrinterA");
-- 
1.8.3.1



More information about the wine-patches mailing list