From 9b396275ad637697815e24582f7420088a7baf83 Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Fri, 17 Aug 2007 14:10:32 +0200 Subject: [PATCH] oleaut32/tests: Use GetModuleHandle and add a few skip's. --- dlls/oleaut32/tests/olefont.c | 5 ++++- dlls/oleaut32/tests/olepicture.c | 5 ++++- dlls/oleaut32/tests/safearray.c | 2 +- dlls/oleaut32/tests/varformat.c | 2 +- dlls/oleaut32/tests/vartype.c | 5 +---- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index 69621cf965a..1e6678b3499 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -798,10 +798,13 @@ static void test_AddRefHfont(void) START_TEST(olefont) { - hOleaut32 = LoadLibraryA("oleaut32.dll"); + hOleaut32 = GetModuleHandleA("oleaut32.dll"); pOleCreateFontIndirect = (void*)GetProcAddress(hOleaut32, "OleCreateFontIndirect"); if (!pOleCreateFontIndirect) + { + skip("OleCreateFontIndirect not available\n"); return; + } test_QueryInterface(); test_type_info(); diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 00027dedddd..99cefd26fb8 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -426,11 +426,14 @@ static void test_OleCreatePictureIndirect(void) START_TEST(olepicture) { - hOleaut32 = LoadLibraryA("oleaut32.dll"); + hOleaut32 = GetModuleHandleA("oleaut32.dll"); pOleLoadPicture = (void*)GetProcAddress(hOleaut32, "OleLoadPicture"); pOleCreatePictureIndirect = (void*)GetProcAddress(hOleaut32, "OleCreatePictureIndirect"); if (!pOleLoadPicture) + { + skip("OleLoadPicture is not available\n"); return; + } /* Test regular 1x1 pixel images of gif, jpg, bmp type */ test_pic(gifimage, sizeof(gifimage)); diff --git a/dlls/oleaut32/tests/safearray.c b/dlls/oleaut32/tests/safearray.c index 429f08c0561..1857ab5a5ca 100644 --- a/dlls/oleaut32/tests/safearray.c +++ b/dlls/oleaut32/tests/safearray.c @@ -1682,7 +1682,7 @@ static void test_SafeArrayDestroyData (void) START_TEST(safearray) { - hOleaut32 = LoadLibraryA("oleaut32.dll"); + hOleaut32 = GetModuleHandleA("oleaut32.dll"); GETPTR(SafeArrayAllocDescriptorEx); GETPTR(SafeArrayCopyData); diff --git a/dlls/oleaut32/tests/varformat.c b/dlls/oleaut32/tests/varformat.c index afec605d687..f7c7c28bd8d 100644 --- a/dlls/oleaut32/tests/varformat.c +++ b/dlls/oleaut32/tests/varformat.c @@ -394,7 +394,7 @@ static void test_VarFormat(void) START_TEST(varformat) { - hOleaut32 = LoadLibraryA("oleaut32.dll"); + hOleaut32 = GetModuleHandleA("oleaut32.dll"); test_VarFormatNumber(); test_VarFormat(); diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index d6f26932094..49106ff6855 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -5765,10 +5765,7 @@ static void test_ChangeType_keep_dst(void) START_TEST(vartype) { - hOleaut32 = LoadLibraryA("oleaut32.dll"); - ok(hOleaut32 != 0, "Failed to load oleaut32.dll\n"); - if (!hOleaut32) - return; + hOleaut32 = GetModuleHandleA("oleaut32.dll"); trace("LCID's: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(), GetUserDefaultLCID());