[cairo-commit] src/cairo-win32-surface.c

Vladimir Vukicevic vladimir at kemper.freedesktop.org
Tue Oct 7 15:20:37 PDT 2008


 src/cairo-win32-surface.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0c777a3e0de0d48289432a3d66be68f8779b08a0
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date:   Tue Oct 7 15:20:33 2008 -0700

    [win32] Use wide-char versions of some API functions, for compat with Windows Mobile

diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 7834d97..b85b6e5 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -87,7 +87,7 @@ _cairo_win32_print_gdi_error (const char *context)
     void *lpMsgBuf;
     DWORD last_error = GetLastError ();
 
-    if (!FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER |
+    if (!FormatMessageW (FORMAT_MESSAGE_ALLOCATE_BUFFER |
 			 FORMAT_MESSAGE_FROM_SYSTEM,
 			 NULL,
 			 last_error,
@@ -96,7 +96,7 @@ _cairo_win32_print_gdi_error (const char *context)
 			 0, NULL)) {
 	fprintf (stderr, "%s: Unknown GDI error", context);
     } else {
-	fprintf (stderr, "%s: %s", context, (char *)lpMsgBuf);
+	fwprintf (stderr, "%S: %s", context, (char *)lpMsgBuf);
 
 	LocalFree (lpMsgBuf);
     }
@@ -744,7 +744,7 @@ _composite_alpha_blend (cairo_win32_surface_t *dst,
 	if (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId ||
 	    os.dwMajorVersion != 4 || os.dwMinorVersion != 10)
 	{
-	    HMODULE msimg32_dll = LoadLibraryA ("msimg32");
+	    HMODULE msimg32_dll = LoadLibraryW (L"msimg32");
 
 	    if (msimg32_dll != NULL)
 		alpha_blend = (cairo_alpha_blend_func_t)GetProcAddress (msimg32_dll,


More information about the cairo-commit mailing list