tests: Use the explicit LoadLibraryA function.
This commit is contained in:
parent
360afb93b5
commit
9463dba830
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1323,7 +1323,7 @@ START_TEST(ds3d)
|
|||
|
||||
CoInitialize(NULL);
|
||||
|
||||
hDsound = LoadLibrary("dsound.dll");
|
||||
hDsound = LoadLibraryA("dsound.dll");
|
||||
if (hDsound)
|
||||
{
|
||||
|
||||
|
|
|
@ -1146,7 +1146,7 @@ START_TEST(ds3d8)
|
|||
|
||||
CoInitialize(NULL);
|
||||
|
||||
hDsound = LoadLibrary("dsound.dll");
|
||||
hDsound = LoadLibraryA("dsound.dll");
|
||||
if (hDsound)
|
||||
{
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
|
@ -1176,7 +1176,7 @@ START_TEST(dsound8)
|
|||
|
||||
CoInitialize(NULL);
|
||||
|
||||
hDsound = LoadLibrary("dsound.dll");
|
||||
hDsound = LoadLibraryA("dsound.dll");
|
||||
if (hDsound)
|
||||
{
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ START_TEST(duplex)
|
|||
|
||||
CoInitialize(NULL);
|
||||
|
||||
hDsound = LoadLibrary("dsound.dll");
|
||||
hDsound = LoadLibraryA("dsound.dll");
|
||||
if (hDsound)
|
||||
{
|
||||
|
||||
|
|
|
@ -722,7 +722,7 @@ START_TEST(propset)
|
|||
|
||||
CoInitialize(NULL);
|
||||
|
||||
hDsound = LoadLibrary("dsound.dll");
|
||||
hDsound = LoadLibraryA("dsound.dll");
|
||||
if (hDsound)
|
||||
{
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -7415,7 +7415,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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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*)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue