[gdi] Fix test for GetGlyphIndicesW on non Unicode systems

Jeff L lats at yless4u.com.au
Fri Sep 1 07:55:50 CDT 2006


This patch adds a check to see if GetGlyphIndicesW is on the system 
running the tests. 

Changelog:
Add check to see if the call is present in the gdi32.dll before running 
tests.

Jeff Latimer
-------------- next part --------------
>From fd86eefac3fdff95e851f0d2a3499b0bf5fa6a7b Mon Sep 17 00:00:00 2001
From: Jeff Latimer <lats at yless4u.com.au>
Date: Fri, 1 Sep 2006 22:15:44 +1000
Subject: [PATCH] Fix test for GetGlyphIndicesW on non Unicode systems
---
 dlls/gdi/tests/font.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi/tests/font.c b/dlls/gdi/tests/font.c
index bfda353..2200ba6 100644
--- a/dlls/gdi/tests/font.c
+++ b/dlls/gdi/tests/font.c
@@ -402,6 +402,14 @@ static void test_GetGlyphIndices()
     WORD     glyphs[(sizeof(testtext)/2)-1];
     TEXTMETRIC textm;
 
+    typedef BOOL (WINAPI *fnGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags);
+    fnGetGlyphIndicesW GetGlyphIndicesW = (fnGetGlyphIndicesW)GetProcAddress(LoadLibrary("gdi32"), 
+                                           "GetGlyphIndicesW");
+    if (!GetGlyphIndicesW) {
+        trace("GetGlyphIndices not available on platform\n");
+        return;
+    }
+
     memset(&lf, 0, sizeof(lf));
     strcpy(lf.lfFaceName, "Symbol");
     lf.lfHeight = 20;
-- 
1.4.1



More information about the wine-patches mailing list