Commit 9b396275 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

oleaut32/tests: Use GetModuleHandle and add a few skip's.

parent e9ec5d4a
...@@ -798,10 +798,13 @@ static void test_AddRefHfont(void) ...@@ -798,10 +798,13 @@ static void test_AddRefHfont(void)
START_TEST(olefont) START_TEST(olefont)
{ {
hOleaut32 = LoadLibraryA("oleaut32.dll"); hOleaut32 = GetModuleHandleA("oleaut32.dll");
pOleCreateFontIndirect = (void*)GetProcAddress(hOleaut32, "OleCreateFontIndirect"); pOleCreateFontIndirect = (void*)GetProcAddress(hOleaut32, "OleCreateFontIndirect");
if (!pOleCreateFontIndirect) if (!pOleCreateFontIndirect)
{
skip("OleCreateFontIndirect not available\n");
return; return;
}
test_QueryInterface(); test_QueryInterface();
test_type_info(); test_type_info();
......
...@@ -426,11 +426,14 @@ static void test_OleCreatePictureIndirect(void) ...@@ -426,11 +426,14 @@ static void test_OleCreatePictureIndirect(void)
START_TEST(olepicture) START_TEST(olepicture)
{ {
hOleaut32 = LoadLibraryA("oleaut32.dll"); hOleaut32 = GetModuleHandleA("oleaut32.dll");
pOleLoadPicture = (void*)GetProcAddress(hOleaut32, "OleLoadPicture"); pOleLoadPicture = (void*)GetProcAddress(hOleaut32, "OleLoadPicture");
pOleCreatePictureIndirect = (void*)GetProcAddress(hOleaut32, "OleCreatePictureIndirect"); pOleCreatePictureIndirect = (void*)GetProcAddress(hOleaut32, "OleCreatePictureIndirect");
if (!pOleLoadPicture) if (!pOleLoadPicture)
{
skip("OleLoadPicture is not available\n");
return; return;
}
/* Test regular 1x1 pixel images of gif, jpg, bmp type */ /* Test regular 1x1 pixel images of gif, jpg, bmp type */
test_pic(gifimage, sizeof(gifimage)); test_pic(gifimage, sizeof(gifimage));
......
...@@ -1682,7 +1682,7 @@ static void test_SafeArrayDestroyData (void) ...@@ -1682,7 +1682,7 @@ static void test_SafeArrayDestroyData (void)
START_TEST(safearray) START_TEST(safearray)
{ {
hOleaut32 = LoadLibraryA("oleaut32.dll"); hOleaut32 = GetModuleHandleA("oleaut32.dll");
GETPTR(SafeArrayAllocDescriptorEx); GETPTR(SafeArrayAllocDescriptorEx);
GETPTR(SafeArrayCopyData); GETPTR(SafeArrayCopyData);
......
...@@ -394,7 +394,7 @@ static void test_VarFormat(void) ...@@ -394,7 +394,7 @@ static void test_VarFormat(void)
START_TEST(varformat) START_TEST(varformat)
{ {
hOleaut32 = LoadLibraryA("oleaut32.dll"); hOleaut32 = GetModuleHandleA("oleaut32.dll");
test_VarFormatNumber(); test_VarFormatNumber();
test_VarFormat(); test_VarFormat();
......
...@@ -5765,10 +5765,7 @@ static void test_ChangeType_keep_dst(void) ...@@ -5765,10 +5765,7 @@ static void test_ChangeType_keep_dst(void)
START_TEST(vartype) START_TEST(vartype)
{ {
hOleaut32 = LoadLibraryA("oleaut32.dll"); hOleaut32 = GetModuleHandleA("oleaut32.dll");
ok(hOleaut32 != 0, "Failed to load oleaut32.dll\n");
if (!hOleaut32)
return;
trace("LCID's: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(), trace("LCID's: System=0x%08x, User=0x%08x\n", GetSystemDefaultLCID(),
GetUserDefaultLCID()); GetUserDefaultLCID());
......
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