From a54f8ed6c7d2609319568e085993410b8bf8303c Mon Sep 17 00:00:00 2001 From: "cpu@google.com" Date: Fri, 19 Jun 2009 17:57:39 +0000 Subject: Use correct calling convention for intercepted call - Thanks to zhu.she.pi@gmail.com for finding the bug BUG=14631 TEST=no test Review URL: http://codereview.chromium.org/131066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18827 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/autocomplete/autocomplete_edit_view_win.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome/browser/autocomplete') diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc index 5cc2662..03e7824 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc @@ -331,7 +331,8 @@ const SkColor kSchemeSelectedStrikeoutColor = HWND edit_hwnd = NULL; PAINTSTRUCT paint_struct; -HDC BeginPaintIntercept(HWND hWnd, LPPAINTSTRUCT lpPaint) { +// Intercepted method for BeginPaint(). Must use __stdcall convention. +HDC WINAPI BeginPaintIntercept(HWND hWnd, LPPAINTSTRUCT lpPaint) { if (!edit_hwnd || (hWnd != edit_hwnd)) return ::BeginPaint(hWnd, lpPaint); @@ -339,7 +340,8 @@ HDC BeginPaintIntercept(HWND hWnd, LPPAINTSTRUCT lpPaint) { return paint_struct.hdc; } -BOOL EndPaintIntercept(HWND hWnd, const PAINTSTRUCT* lpPaint) { +// Intercepted method for EndPaint(). Must use __stdcall convention. +BOOL WINAPI EndPaintIntercept(HWND hWnd, const PAINTSTRUCT* lpPaint) { return (edit_hwnd && (hWnd == edit_hwnd)) ? true : ::EndPaint(hWnd, lpPaint); } -- cgit v1.1