Skip to content

Commit

Permalink
[win32] Use wide-char versions of some API functions, for compat with…
Browse files Browse the repository at this point in the history
… Windows Mobile
  • Loading branch information
Vladimir Vukicevic authored and Vladimir Vukicevic committed Oct 7, 2008
1 parent cf572b5 commit 0c777a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cairo-win32-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 0c777a3

Please sign in to comment.