[PATCH] user32/winex11.drv: Change all functions to use CDECL

Maarten Lankhorst m.b.lankhorst at gmail.com
Tue Dec 16 08:32:08 CST 2008


---
 dlls/user32/driver.c           |  229 ++++++++++++++++++++--------------------
 dlls/user32/user_private.h     |  104 +++++++++---------
 dlls/winex11.drv/clipboard.c   |   24 ++--
 dlls/winex11.drv/event.c       |    6 +-
 dlls/winex11.drv/keyboard.c    |   24 ++--
 dlls/winex11.drv/mouse.c       |   10 +-
 dlls/winex11.drv/scroll.c      |    4 +-
 dlls/winex11.drv/settings.c    |    6 +-
 dlls/winex11.drv/window.c      |   42 ++++----
 dlls/winex11.drv/x11drv.h      |   12 +-
 dlls/winex11.drv/x11drv_main.c |    4 +-
 dlls/winex11.drv/xinerama.c    |    4 +-
 12 files changed, 235 insertions(+), 234 deletions(-)

diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index 2f20b41..3140e26 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -152,169 +152,169 @@ void USER_unload_driver(void)
  * These are fallbacks for entry points that are not implemented in the real driver.
  */
 
-static HKL nulldrv_ActivateKeyboardLayout( HKL layout, UINT flags )
+static HKL CDECL nulldrv_ActivateKeyboardLayout( HKL layout, UINT flags )
 {
     return 0;
 }
 
-static void nulldrv_Beep(void)
+static void CDECL nulldrv_Beep(void)
 {
 }
 
-static SHORT nulldrv_GetAsyncKeyState( INT key )
+static SHORT CDECL nulldrv_GetAsyncKeyState( INT key )
 {
     return 0;
 }
 
-static INT nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
+static INT CDECL nulldrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
 {
     return 0;
 }
 
-static HKL nulldrv_GetKeyboardLayout( DWORD layout )
+static HKL CDECL nulldrv_GetKeyboardLayout( DWORD layout )
 {
     return 0;
 }
 
-static BOOL nulldrv_GetKeyboardLayoutName( LPWSTR name )
+static BOOL CDECL nulldrv_GetKeyboardLayoutName( LPWSTR name )
 {
     return FALSE;
 }
 
-static HKL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
+static HKL CDECL nulldrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
 {
     return 0;
 }
 
-static UINT nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
+static UINT CDECL nulldrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
 {
     return 0;
 }
 
-static UINT nulldrv_SendInput( UINT count, LPINPUT inputs, int size )
+static UINT CDECL nulldrv_SendInput( UINT count, LPINPUT inputs, int size )
 {
     return 0;
 }
 
-static INT nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
-                                int size, UINT flags, HKL layout )
+static INT CDECL nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
+                                      int size, UINT flags, HKL layout )
 {
     return 0;
 }
 
-static BOOL nulldrv_UnloadKeyboardLayout( HKL layout )
+static BOOL CDECL nulldrv_UnloadKeyboardLayout( HKL layout )
 {
     return 0;
 }
 
-static SHORT nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
+static SHORT CDECL nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
 {
     return -1;
 }
 
-static void nulldrv_SetCursor( struct tagCURSORICONINFO *info )
+static void CDECL nulldrv_SetCursor( struct tagCURSORICONINFO *info )
 {
 }
 
-static BOOL nulldrv_GetCursorPos( LPPOINT pt )
+static BOOL CDECL nulldrv_GetCursorPos( LPPOINT pt )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_SetCursorPos( INT x, INT y )
+static BOOL CDECL nulldrv_SetCursorPos( INT x, INT y )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_ClipCursor( LPCRECT clip )
+static BOOL CDECL nulldrv_ClipCursor( LPCRECT clip )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_GetScreenSaveActive(void)
+static BOOL CDECL nulldrv_GetScreenSaveActive(void)
 {
     return FALSE;
 }
 
-static void nulldrv_SetScreenSaveActive( BOOL on )
+static void CDECL nulldrv_SetScreenSaveActive( BOOL on )
 {
 }
 
-static INT nulldrv_AcquireClipboard( HWND hwnd )
+static INT CDECL nulldrv_AcquireClipboard( HWND hwnd )
 {
     return 0;
 }
 
-static BOOL nulldrv_CountClipboardFormats(void)
+static BOOL CDECL nulldrv_CountClipboardFormats(void)
 {
     return 0;
 }
 
-static void nulldrv_EmptyClipboard( BOOL keepunowned )
+static void CDECL nulldrv_EmptyClipboard( BOOL keepunowned )
 {
 }
 
-static void nulldrv_EndClipboardUpdate(void)
+static void CDECL nulldrv_EndClipboardUpdate(void)
 {
 }
 
-static UINT nulldrv_EnumClipboardFormats( UINT format )
+static UINT CDECL nulldrv_EnumClipboardFormats( UINT format )
 {
     return 0;
 }
 
-static BOOL nulldrv_GetClipboardData( UINT format, HANDLE16 *h16, HANDLE *h32 )
+static BOOL CDECL nulldrv_GetClipboardData( UINT format, HANDLE16 *h16, HANDLE *h32 )
 {
     return FALSE;
 }
 
-static INT nulldrv_GetClipboardFormatName( UINT format, LPWSTR buffer, UINT len )
+static INT CDECL nulldrv_GetClipboardFormatName( UINT format, LPWSTR buffer, UINT len )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_IsClipboardFormatAvailable( UINT format )
+static BOOL CDECL nulldrv_IsClipboardFormatAvailable( UINT format )
 {
     return FALSE;
 }
 
-static UINT nulldrv_RegisterClipboardFormat( LPCWSTR name )
+static UINT CDECL nulldrv_RegisterClipboardFormat( LPCWSTR name )
 {
     return 0;
 }
 
-static BOOL nulldrv_SetClipboardData( UINT format, HANDLE16 h16, HANDLE h32, BOOL owner )
+static BOOL CDECL nulldrv_SetClipboardData( UINT format, HANDLE16 h16, HANDLE h32, BOOL owner )
 {
     return FALSE;
 }
 
-static LONG nulldrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
+static LONG CDECL nulldrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
                                              DWORD flags, LPVOID lparam )
 {
     return DISP_CHANGE_FAILED;
 }
 
-static BOOL nulldrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
+static BOOL CDECL nulldrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
+static BOOL CDECL nulldrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
+static BOOL CDECL nulldrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
 {
     return FALSE;
 }
 
-static BOOL nulldrv_CreateDesktopWindow( HWND hwnd )
+static BOOL CDECL nulldrv_CreateDesktopWindow( HWND hwnd )
 {
     return TRUE;
 }
 
-static BOOL nulldrv_CreateWindow( HWND hwnd )
+static BOOL CDECL nulldrv_CreateWindow( HWND hwnd )
 {
     static int warned;
     if (warned++)
@@ -336,89 +336,89 @@ static BOOL nulldrv_CreateWindow( HWND hwnd )
     return FALSE;
 }
 
-static void nulldrv_DestroyWindow( HWND hwnd )
+static void CDECL nulldrv_DestroyWindow( HWND hwnd )
 {
 }
 
-static void nulldrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
-                           const RECT *top_rect, DWORD flags )
+static void CDECL nulldrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
+                                 const RECT *top_rect, DWORD flags )
 {
 }
 
-static DWORD nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
-                                                  DWORD mask, DWORD flags )
+static DWORD CDECL nulldrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
+                                                        DWORD mask, DWORD flags )
 {
     return WaitForMultipleObjectsEx( count, handles, flags & MWMO_WAITALL,
                                      timeout, flags & MWMO_ALERTABLE );
 }
 
-static void nulldrv_ReleaseDC( HWND hwnd, HDC hdc )
+static void CDECL nulldrv_ReleaseDC( HWND hwnd, HDC hdc )
 {
 }
 
-static BOOL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
-                              HRGN hrgn, LPRECT update )
+static BOOL CDECL nulldrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
+                                    HRGN hrgn, LPRECT update )
 {
     return FALSE;
 }
 
-static void nulldrv_SetCapture( HWND hwnd, UINT flags )
+static void CDECL nulldrv_SetCapture( HWND hwnd, UINT flags )
 {
 }
 
-static void nulldrv_SetFocus( HWND hwnd )
+static void CDECL nulldrv_SetFocus( HWND hwnd )
 {
 }
 
-static void nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
+static void CDECL nulldrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
 {
 }
 
-static void nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
+static void CDECL nulldrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
 {
 }
 
-static int nulldrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
+static int CDECL nulldrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
 {
     return 1;
 }
 
-static void nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
+static void CDECL nulldrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
 {
 }
 
-static void nulldrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
+static void CDECL nulldrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
 {
 }
 
-static void nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
+static void CDECL nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
 {
 }
 
-static UINT nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
+static UINT CDECL nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
 {
     return swp;
 }
 
-static LRESULT nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
+static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
 {
     return -1;
 }
 
-static LRESULT nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
+static LRESULT CDECL nulldrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
 {
     return 0;
 }
 
-static void nulldrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
-                                       const RECT *window_rect, const RECT *client_rect,
-                                       RECT *visible_rect )
+static void CDECL nulldrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
+                                             const RECT *window_rect, const RECT *client_rect,
+                                             RECT *visible_rect )
 {
 }
 
-static void nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
-                                      const RECT *window_rect, const RECT *client_rect,
-                                      const RECT *visible_rect, const RECT *valid_rects )
+static void CDECL nulldrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
+                                            const RECT *window_rect, const RECT *client_rect,
+                                            const RECT *visible_rect, const RECT *valid_rects )
 {
 }
 
@@ -492,262 +492,262 @@ static USER_DRIVER null_driver =
  * Each entry point simply loads the real driver and chains to it.
  */
 
-static HKL loaderdrv_ActivateKeyboardLayout( HKL layout, UINT flags )
+static HKL CDECL loaderdrv_ActivateKeyboardLayout( HKL layout, UINT flags )
 {
     return load_driver()->pActivateKeyboardLayout( layout, flags );
 }
 
-static void loaderdrv_Beep(void)
+static void CDECL loaderdrv_Beep(void)
 {
     load_driver()->pBeep();
 }
 
-static SHORT loaderdrv_GetAsyncKeyState( INT key )
+static SHORT CDECL loaderdrv_GetAsyncKeyState( INT key )
 {
     return load_driver()->pGetAsyncKeyState( key );
 }
 
-static INT loaderdrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
+static INT CDECL loaderdrv_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size )
 {
     return load_driver()->pGetKeyNameText( lparam, buffer, size );
 }
 
-static HKL loaderdrv_GetKeyboardLayout( DWORD layout )
+static HKL CDECL loaderdrv_GetKeyboardLayout( DWORD layout )
 {
     return load_driver()->pGetKeyboardLayout( layout );
 }
 
-static BOOL loaderdrv_GetKeyboardLayoutName( LPWSTR name )
+static BOOL CDECL loaderdrv_GetKeyboardLayoutName( LPWSTR name )
 {
     return load_driver()->pGetKeyboardLayoutName( name );
 }
 
-static HKL loaderdrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
+static HKL CDECL loaderdrv_LoadKeyboardLayout( LPCWSTR name, UINT flags )
 {
     return load_driver()->pLoadKeyboardLayout( name, flags );
 }
 
-static UINT loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
+static UINT CDECL loaderdrv_MapVirtualKeyEx( UINT code, UINT type, HKL layout )
 {
     return load_driver()->pMapVirtualKeyEx( code, type, layout );
 }
 
-static UINT loaderdrv_SendInput( UINT count, LPINPUT inputs, int size )
+static UINT CDECL loaderdrv_SendInput( UINT count, LPINPUT inputs, int size )
 {
     return load_driver()->pSendInput( count, inputs, size );
 }
 
-static INT loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
+static INT CDECL loaderdrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
                                   int size, UINT flags, HKL layout )
 {
     return load_driver()->pToUnicodeEx( virt, scan, state, str, size, flags, layout );
 }
 
-static BOOL loaderdrv_UnloadKeyboardLayout( HKL layout )
+static BOOL CDECL loaderdrv_UnloadKeyboardLayout( HKL layout )
 {
     return load_driver()->pUnloadKeyboardLayout( layout );
 }
 
-static SHORT loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
+static SHORT CDECL loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
 {
     return load_driver()->pVkKeyScanEx( ch, layout );
 }
 
-static void loaderdrv_SetCursor( struct tagCURSORICONINFO *info )
+static void CDECL loaderdrv_SetCursor( struct tagCURSORICONINFO *info )
 {
     load_driver()->pSetCursor( info );
 }
 
-static BOOL loaderdrv_GetCursorPos( LPPOINT pt )
+static BOOL CDECL loaderdrv_GetCursorPos( LPPOINT pt )
 {
     return load_driver()->pGetCursorPos( pt );
 }
 
-static BOOL loaderdrv_SetCursorPos( INT x, INT y )
+static BOOL CDECL loaderdrv_SetCursorPos( INT x, INT y )
 {
     return load_driver()->pSetCursorPos( x, y );
 }
 
-static BOOL loaderdrv_ClipCursor( LPCRECT clip )
+static BOOL CDECL loaderdrv_ClipCursor( LPCRECT clip )
 {
     return load_driver()->pClipCursor( clip );
 }
 
-static BOOL loaderdrv_GetScreenSaveActive(void)
+static BOOL CDECL loaderdrv_GetScreenSaveActive(void)
 {
     return load_driver()->pGetScreenSaveActive();
 }
 
-static void loaderdrv_SetScreenSaveActive( BOOL on )
+static void CDECL loaderdrv_SetScreenSaveActive( BOOL on )
 {
     load_driver()->pSetScreenSaveActive( on );
 }
 
-static INT loaderdrv_AcquireClipboard( HWND hwnd )
+static INT CDECL loaderdrv_AcquireClipboard( HWND hwnd )
 {
     return load_driver()->pAcquireClipboard( hwnd );
 }
 
-static BOOL loaderdrv_CountClipboardFormats(void)
+static BOOL CDECL loaderdrv_CountClipboardFormats(void)
 {
     return load_driver()->pCountClipboardFormats();
 }
 
-static void loaderdrv_EmptyClipboard( BOOL keepunowned )
+static void CDECL loaderdrv_EmptyClipboard( BOOL keepunowned )
 {
     load_driver()->pEmptyClipboard( keepunowned );
 }
 
-static void loaderdrv_EndClipboardUpdate(void)
+static void CDECL loaderdrv_EndClipboardUpdate(void)
 {
     load_driver()->pEndClipboardUpdate();
 }
 
-static UINT loaderdrv_EnumClipboardFormats( UINT format )
+static UINT CDECL loaderdrv_EnumClipboardFormats( UINT format )
 {
     return load_driver()->pEnumClipboardFormats( format );
 }
 
-static BOOL loaderdrv_GetClipboardData( UINT format, HANDLE16 *h16, HANDLE *h32 )
+static BOOL CDECL loaderdrv_GetClipboardData( UINT format, HANDLE16 *h16, HANDLE *h32 )
 {
     return load_driver()->pGetClipboardData( format, h16, h32 );
 }
 
-static INT loaderdrv_GetClipboardFormatName( UINT format, LPWSTR buffer, UINT len )
+static INT CDECL loaderdrv_GetClipboardFormatName( UINT format, LPWSTR buffer, UINT len )
 {
     return load_driver()->pGetClipboardFormatName( format, buffer, len );
 }
 
-static BOOL loaderdrv_IsClipboardFormatAvailable( UINT format )
+static BOOL CDECL loaderdrv_IsClipboardFormatAvailable( UINT format )
 {
     return load_driver()->pIsClipboardFormatAvailable( format );
 }
 
-static UINT loaderdrv_RegisterClipboardFormat( LPCWSTR name )
+static UINT CDECL loaderdrv_RegisterClipboardFormat( LPCWSTR name )
 {
     return load_driver()->pRegisterClipboardFormat( name );
 }
 
-static BOOL loaderdrv_SetClipboardData( UINT format, HANDLE16 h16, HANDLE h32, BOOL owner )
+static BOOL CDECL loaderdrv_SetClipboardData( UINT format, HANDLE16 h16, HANDLE h32, BOOL owner )
 {
     return load_driver()->pSetClipboardData( format, h16, h32, owner );
 }
 
-static LONG loaderdrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
+static LONG CDECL loaderdrv_ChangeDisplaySettingsEx( LPCWSTR name, LPDEVMODEW mode, HWND hwnd,
                                                DWORD flags, LPVOID lparam )
 {
     return load_driver()->pChangeDisplaySettingsEx( name, mode, hwnd, flags, lparam );
 }
 
-static BOOL loaderdrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
+static BOOL CDECL loaderdrv_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
 {
     return load_driver()->pEnumDisplayMonitors( hdc, rect, proc, lp );
 }
 
-static BOOL loaderdrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
+static BOOL CDECL loaderdrv_EnumDisplaySettingsEx( LPCWSTR name, DWORD num, LPDEVMODEW mode, DWORD flags )
 {
     return load_driver()->pEnumDisplaySettingsEx( name, num, mode, flags );
 }
 
-static BOOL loaderdrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
+static BOOL CDECL loaderdrv_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
 {
     return load_driver()->pGetMonitorInfo( handle, info );
 }
 
-static BOOL loaderdrv_CreateDesktopWindow( HWND hwnd )
+static BOOL CDECL loaderdrv_CreateDesktopWindow( HWND hwnd )
 {
     return load_driver()->pCreateDesktopWindow( hwnd );
 }
 
-static BOOL loaderdrv_CreateWindow( HWND hwnd )
+static BOOL CDECL loaderdrv_CreateWindow( HWND hwnd )
 {
     return load_driver()->pCreateWindow( hwnd );
 }
 
-static void loaderdrv_DestroyWindow( HWND hwnd )
+static void CDECL loaderdrv_DestroyWindow( HWND hwnd )
 {
     load_driver()->pDestroyWindow( hwnd );
 }
 
-static void loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
-                             const RECT *top_rect, DWORD flags )
+static void CDECL loaderdrv_GetDC( HDC hdc, HWND hwnd, HWND top_win, const RECT *win_rect,
+                                   const RECT *top_rect, DWORD flags )
 {
     load_driver()->pGetDC( hdc, hwnd, top_win, win_rect, top_rect, flags );
 }
 
-static DWORD loaderdrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
-                                                    DWORD mask, DWORD flags )
+static DWORD CDECL loaderdrv_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
+                                                          DWORD mask, DWORD flags )
 {
     return load_driver()->pMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags );
 }
 
-static void loaderdrv_ReleaseDC( HWND hwnd, HDC hdc )
+static void CDECL loaderdrv_ReleaseDC( HWND hwnd, HDC hdc )
 {
     load_driver()->pReleaseDC( hwnd, hdc );
 }
 
-static BOOL loaderdrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
+static BOOL CDECL loaderdrv_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
                                 HRGN hrgn, LPRECT update )
 {
     return load_driver()->pScrollDC( hdc, dx, dy, scroll, clip, hrgn, update );
 }
 
-static void loaderdrv_SetCapture( HWND hwnd, UINT flags )
+static void CDECL loaderdrv_SetCapture( HWND hwnd, UINT flags )
 {
     load_driver()->pSetCapture( hwnd, flags );
 }
 
-static void loaderdrv_SetFocus( HWND hwnd )
+static void CDECL loaderdrv_SetFocus( HWND hwnd )
 {
     load_driver()->pSetFocus( hwnd );
 }
 
-static void loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
+static void CDECL loaderdrv_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
 {
     load_driver()->pSetLayeredWindowAttributes( hwnd, key, alpha, flags );
 }
 
-static void loaderdrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
+static void CDECL loaderdrv_SetParent( HWND hwnd, HWND parent, HWND old_parent )
 {
     load_driver()->pSetParent( hwnd, parent, old_parent );
 }
 
-static int loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
+static int CDECL loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
 {
     return load_driver()->pSetWindowRgn( hwnd, hrgn, redraw );
 }
 
-static void loaderdrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
+static void CDECL loaderdrv_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
 {
     load_driver()->pSetWindowIcon( hwnd, type, icon );
 }
 
-static void loaderdrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
+static void CDECL loaderdrv_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
 {
     load_driver()->pSetWindowStyle( hwnd, offset, style );
 }
 
-static void loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
+static void CDECL loaderdrv_SetWindowText( HWND hwnd, LPCWSTR text )
 {
     load_driver()->pSetWindowText( hwnd, text );
 }
 
-static UINT loaderdrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
+static UINT CDECL loaderdrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
 {
     return load_driver()->pShowWindow( hwnd, cmd, rect, swp );
 }
 
-static LRESULT loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
+static LRESULT CDECL loaderdrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
 {
     return load_driver()->pSysCommand( hwnd, wparam, lparam );
 }
 
-static LRESULT loaderdrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
+static LRESULT CDECL loaderdrv_WindowMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
 {
     return load_driver()->pWindowMessage( hwnd, msg, wparam, lparam );
 }
 
-static void loaderdrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
+static void CDECL loaderdrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
                                          const RECT *window_rect, const RECT *client_rect,
                                          RECT *visible_rect )
 {
@@ -755,7 +755,7 @@ static void loaderdrv_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_
                                        window_rect, client_rect, visible_rect );
 }
 
-static void loaderdrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
+static void CDECL loaderdrv_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
                                         const RECT *window_rect, const RECT *client_rect,
                                         const RECT *visible_rect, const RECT *valid_rects )
 {
@@ -824,3 +824,4 @@ static USER_DRIVER lazy_load_driver =
     loaderdrv_WindowPosChanging,
     loaderdrv_WindowPosChanged
 };
+
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 2bf8af2..54b02d6 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -114,63 +114,63 @@ struct tagCURSORICONINFO;
 
 typedef struct tagUSER_DRIVER {
     /* keyboard functions */
-    HKL    (*pActivateKeyboardLayout)(HKL, UINT);
-    void   (*pBeep)(void);
-    SHORT  (*pGetAsyncKeyState)(INT);
-    INT    (*pGetKeyNameText)(LONG, LPWSTR, INT);
-    HKL    (*pGetKeyboardLayout)(DWORD);
-    BOOL   (*pGetKeyboardLayoutName)(LPWSTR);
-    HKL    (*pLoadKeyboardLayout)(LPCWSTR, UINT);
-    UINT   (*pMapVirtualKeyEx)(UINT, UINT, HKL);
-    UINT   (*pSendInput)(UINT, LPINPUT, int);
-    INT    (*pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL);
-    BOOL   (*pUnloadKeyboardLayout)(HKL);
-    SHORT  (*pVkKeyScanEx)(WCHAR, HKL);
+    HKL    (*CDECL pActivateKeyboardLayout)(HKL, UINT);
+    void   (*CDECL pBeep)(void);
+    SHORT  (*CDECL pGetAsyncKeyState)(INT);
+    INT    (*CDECL pGetKeyNameText)(LONG, LPWSTR, INT);
+    HKL    (*CDECL pGetKeyboardLayout)(DWORD);
+    BOOL   (*CDECL pGetKeyboardLayoutName)(LPWSTR);
+    HKL    (*CDECL pLoadKeyboardLayout)(LPCWSTR, UINT);
+    UINT   (*CDECL pMapVirtualKeyEx)(UINT, UINT, HKL);
+    UINT   (*CDECL pSendInput)(UINT, LPINPUT, int);
+    INT    (*CDECL pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL);
+    BOOL   (*CDECL pUnloadKeyboardLayout)(HKL);
+    SHORT  (*CDECL pVkKeyScanEx)(WCHAR, HKL);
     /* mouse functions */
-    void   (*pSetCursor)(struct tagCURSORICONINFO *);
-    BOOL   (*pGetCursorPos)(LPPOINT);
-    BOOL   (*pSetCursorPos)(INT,INT);
-    BOOL   (*pClipCursor)(LPCRECT);
+    void   (*CDECL pSetCursor)(struct tagCURSORICONINFO *);
+    BOOL   (*CDECL pGetCursorPos)(LPPOINT);
+    BOOL   (*CDECL pSetCursorPos)(INT,INT);
+    BOOL   (*CDECL pClipCursor)(LPCRECT);
     /* screen saver functions */
-    BOOL   (*pGetScreenSaveActive)(void);
-    void   (*pSetScreenSaveActive)(BOOL);
+    BOOL   (*CDECL pGetScreenSaveActive)(void);
+    void   (*CDECL pSetScreenSaveActive)(BOOL);
     /* clipboard functions */
-    INT    (*pAcquireClipboard)(HWND);                     /* Acquire selection */
-    BOOL   (*pCountClipboardFormats)(void);                /* Count available clipboard formats */
-    void   (*pEmptyClipboard)(BOOL);                       /* Empty clipboard data */
-    void   (*pEndClipboardUpdate)(void);                   /* End clipboard update */
-    UINT   (*pEnumClipboardFormats)(UINT);                 /* Enumerate clipboard formats */
-    BOOL   (*pGetClipboardData)(UINT, HANDLE16*, HANDLE*); /* Get specified selection data */
-    INT    (*pGetClipboardFormatName)(UINT, LPWSTR, UINT); /* Get a clipboard format name */
-    BOOL   (*pIsClipboardFormatAvailable)(UINT);           /* Check if specified format is available */
-    UINT   (*pRegisterClipboardFormat)(LPCWSTR);           /* Register a clipboard format */
-    BOOL   (*pSetClipboardData)(UINT, HANDLE16, HANDLE, BOOL);   /* Set specified selection data */
+    INT    (*CDECL pAcquireClipboard)(HWND);                     /* Acquire selection */
+    BOOL   (*CDECL pCountClipboardFormats)(void);                /* Count available clipboard formats */
+    void   (*CDECL pEmptyClipboard)(BOOL);                       /* Empty clipboard data */
+    void   (*CDECL pEndClipboardUpdate)(void);                   /* End clipboard update */
+    UINT   (*CDECL pEnumClipboardFormats)(UINT);                 /* Enumerate clipboard formats */
+    BOOL   (*CDECL pGetClipboardData)(UINT, HANDLE16*, HANDLE*); /* Get specified selection data */
+    INT    (*CDECL pGetClipboardFormatName)(UINT, LPWSTR, UINT); /* Get a clipboard format name */
+    BOOL   (*CDECL pIsClipboardFormatAvailable)(UINT);           /* Check if specified format is available */
+    UINT   (*CDECL pRegisterClipboardFormat)(LPCWSTR);           /* Register a clipboard format */
+    BOOL   (*CDECL pSetClipboardData)(UINT, HANDLE16, HANDLE, BOOL);   /* Set specified selection data */
     /* display modes */
-    LONG   (*pChangeDisplaySettingsEx)(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
-    BOOL   (*pEnumDisplayMonitors)(HDC,LPRECT,MONITORENUMPROC,LPARAM);
-    BOOL   (*pEnumDisplaySettingsEx)(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
-    BOOL   (*pGetMonitorInfo)(HMONITOR,MONITORINFO*);
+    LONG   (*CDECL pChangeDisplaySettingsEx)(LPCWSTR,LPDEVMODEW,HWND,DWORD,LPVOID);
+    BOOL   (*CDECL pEnumDisplayMonitors)(HDC,LPRECT,MONITORENUMPROC,LPARAM);
+    BOOL   (*CDECL pEnumDisplaySettingsEx)(LPCWSTR,DWORD,LPDEVMODEW,DWORD);
+    BOOL   (*CDECL pGetMonitorInfo)(HMONITOR,MONITORINFO*);
     /* windowing functions */
-    BOOL   (*pCreateDesktopWindow)(HWND);
-    BOOL   (*pCreateWindow)(HWND);
-    void   (*pDestroyWindow)(HWND);
-    void   (*pGetDC)(HDC,HWND,HWND,const RECT *,const RECT *,DWORD);
-    DWORD  (*pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
-    void   (*pReleaseDC)(HWND,HDC);
-    BOOL   (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
-    void   (*pSetCapture)(HWND,UINT);
-    void   (*pSetFocus)(HWND);
-    void   (*pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
-    void   (*pSetParent)(HWND,HWND,HWND);
-    int    (*pSetWindowRgn)(HWND,HRGN,BOOL);
-    void   (*pSetWindowIcon)(HWND,UINT,HICON);
-    void   (*pSetWindowStyle)(HWND,INT,STYLESTRUCT*);
-    void   (*pSetWindowText)(HWND,LPCWSTR);
-    UINT   (*pShowWindow)(HWND,INT,RECT*,UINT);
-    LRESULT (*pSysCommand)(HWND,WPARAM,LPARAM);
-    LRESULT (*pWindowMessage)(HWND,UINT,WPARAM,LPARAM);
-    void   (*pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *);
-    void   (*pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *);
+    BOOL   (*CDECL pCreateDesktopWindow)(HWND);
+    BOOL   (*CDECL pCreateWindow)(HWND);
+    void   (*CDECL pDestroyWindow)(HWND);
+    void   (*CDECL pGetDC)(HDC,HWND,HWND,const RECT *,const RECT *,DWORD);
+    DWORD  (*CDECL pMsgWaitForMultipleObjectsEx)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
+    void   (*CDECL pReleaseDC)(HWND,HDC);
+    BOOL   (*CDECL pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
+    void   (*CDECL pSetCapture)(HWND,UINT);
+    void   (*CDECL pSetFocus)(HWND);
+    void   (*CDECL pSetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
+    void   (*CDECL pSetParent)(HWND,HWND,HWND);
+    int    (*CDECL pSetWindowRgn)(HWND,HRGN,BOOL);
+    void   (*CDECL pSetWindowIcon)(HWND,UINT,HICON);
+    void   (*CDECL pSetWindowStyle)(HWND,INT,STYLESTRUCT*);
+    void   (*CDECL pSetWindowText)(HWND,LPCWSTR);
+    UINT   (*CDECL pShowWindow)(HWND,INT,RECT*,UINT);
+    LRESULT (*CDECL pSysCommand)(HWND,WPARAM,LPARAM);
+    LRESULT (*CDECL pWindowMessage)(HWND,UINT,WPARAM,LPARAM);
+    void   (*CDECL pWindowPosChanging)(HWND,HWND,UINT,const RECT *,const RECT *,RECT *);
+    void   (*CDECL pWindowPosChanged)(HWND,HWND,UINT,const RECT *,const RECT *,const RECT *,const RECT *);
 } USER_DRIVER;
 
 extern const USER_DRIVER *USER_Driver DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index 36b26a7..7cea221 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -145,8 +145,8 @@ static int selectionAcquired = 0;              /* Contains the current selection
 static Window selectionWindow = None;          /* The top level X window which owns the selection */
 static Atom selectionCacheSrc = XA_PRIMARY;    /* The selection source from which the clipboard cache was filled */
 
-void X11DRV_EmptyClipboard(BOOL keepunowned);
-void X11DRV_EndClipboardUpdate(void);
+void CDECL X11DRV_EmptyClipboard(BOOL keepunowned);
+void CDECL X11DRV_EndClipboardUpdate(void);
 static HANDLE X11DRV_CLIPBOARD_ImportClipboardData(Display *d, Window w, Atom prop);
 static HANDLE X11DRV_CLIPBOARD_ImportEnhMetaFile(Display *d, Window w, Atom prop);
 static HANDLE X11DRV_CLIPBOARD_ImportMetaFilePict(Display *d, Window w, Atom prop);
@@ -2330,7 +2330,7 @@ static BOOL X11DRV_CLIPBOARD_IsSelectionOwner(void)
  * Registers a custom X clipboard format
  * Returns: Format id or 0 on failure
  */
-UINT X11DRV_RegisterClipboardFormat(LPCWSTR FormatName)
+UINT CDECL X11DRV_RegisterClipboardFormat(LPCWSTR FormatName)
 {
     LPWINE_CLIPFORMAT lpFormat;
 
@@ -2343,7 +2343,7 @@ UINT X11DRV_RegisterClipboardFormat(LPCWSTR FormatName)
 /**************************************************************************
  *		X11DRV_GetClipboardFormatName
  */
-INT X11DRV_GetClipboardFormatName(UINT wFormat, LPWSTR retStr, INT maxlen)
+INT CDECL X11DRV_GetClipboardFormatName(UINT wFormat, LPWSTR retStr, INT maxlen)
 {
     LPWINE_CLIPFORMAT lpFormat;
 
@@ -2373,7 +2373,7 @@ INT X11DRV_GetClipboardFormatName(UINT wFormat, LPWSTR retStr, INT maxlen)
 /**************************************************************************
  *		AcquireClipboard (X11DRV.@)
  */
-int X11DRV_AcquireClipboard(HWND hWndClipWindow)
+int CDECL X11DRV_AcquireClipboard(HWND hWndClipWindow)
 {
     DWORD procid;
     Window owner;
@@ -2443,7 +2443,7 @@ int X11DRV_AcquireClipboard(HWND hWndClipWindow)
  *
  * Empty cached clipboard data. 
  */
-void X11DRV_EmptyClipboard(BOOL keepunowned)
+void CDECL X11DRV_EmptyClipboard(BOOL keepunowned)
 {
     if (ClipData)
     {
@@ -2482,7 +2482,7 @@ void X11DRV_EmptyClipboard(BOOL keepunowned)
 /**************************************************************************
  *		X11DRV_SetClipboardData
  */
-BOOL X11DRV_SetClipboardData(UINT wFormat, HANDLE16 hData16, HANDLE hData32, BOOL owner)
+BOOL CDECL X11DRV_SetClipboardData(UINT wFormat, HANDLE16 hData16, HANDLE hData32, BOOL owner)
 {
     DWORD flags = 0;
     BOOL bResult = TRUE;
@@ -2513,7 +2513,7 @@ BOOL X11DRV_SetClipboardData(UINT wFormat, HANDLE16 hData16, HANDLE hData32, BOO
 /**************************************************************************
  *		CountClipboardFormats
  */
-INT X11DRV_CountClipboardFormats(void)
+INT CDECL X11DRV_CountClipboardFormats(void)
 {
     CLIPBOARDINFO cbinfo;
 
@@ -2528,7 +2528,7 @@ INT X11DRV_CountClipboardFormats(void)
 /**************************************************************************
  *		X11DRV_EnumClipboardFormats
  */
-UINT X11DRV_EnumClipboardFormats(UINT wFormat)
+UINT CDECL X11DRV_EnumClipboardFormats(UINT wFormat)
 {
     CLIPBOARDINFO cbinfo;
     UINT wNextFormat = 0;
@@ -2557,7 +2557,7 @@ UINT X11DRV_EnumClipboardFormats(UINT wFormat)
 /**************************************************************************
  *		X11DRV_IsClipboardFormatAvailable
  */
-BOOL X11DRV_IsClipboardFormatAvailable(UINT wFormat)
+BOOL CDECL X11DRV_IsClipboardFormatAvailable(UINT wFormat)
 {
     BOOL bRet = FALSE;
     CLIPBOARDINFO cbinfo;
@@ -2578,7 +2578,7 @@ BOOL X11DRV_IsClipboardFormatAvailable(UINT wFormat)
 /**************************************************************************
  *		GetClipboardData (USER.142)
  */
-BOOL X11DRV_GetClipboardData(UINT wFormat, HANDLE16* phData16, HANDLE* phData32)
+BOOL CDECL X11DRV_GetClipboardData(UINT wFormat, HANDLE16* phData16, HANDLE* phData32)
 {
     CLIPBOARDINFO cbinfo;
     LPWINE_CLIPDATA lpRender;
@@ -2773,7 +2773,7 @@ static BOOL X11DRV_CLIPBOARD_SynthesizeData(UINT wFormatID)
  * TODO:
  *  Add locale if it hasn't already been added
  */
-void X11DRV_EndClipboardUpdate(void)
+void CDECL X11DRV_EndClipboardUpdate(void)
 {
     INT count = ClipDataCount;
 
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index f0aea44..871ebef 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -390,8 +390,8 @@ static int process_events( Display *display, Bool (*filter)(), ULONG_PTR arg )
 /***********************************************************************
  *           MsgWaitForMultipleObjectsEx   (X11DRV.@)
  */
-DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
-                                          DWORD timeout, DWORD mask, DWORD flags )
+DWORD CDECL X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
+                                                  DWORD timeout, DWORD mask, DWORD flags )
 {
     DWORD ret;
     struct x11drv_thread_data *data = TlsGetValue( thread_data_tls_index );
@@ -1361,7 +1361,7 @@ static void X11DRV_ClientMessage( HWND hwnd, XEvent *xev )
 /***********************************************************************
  *		X11DRV_SendInput  (X11DRV.@)
  */
-UINT X11DRV_SendInput( UINT count, LPINPUT inputs, int size )
+UINT CDECL X11DRV_SendInput( UINT count, LPINPUT inputs, int size )
 {
     UINT i;
 
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index fcde245..d4f249d 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1887,7 +1887,7 @@ static BOOL match_x11_keyboard_layout(HKL hkl)
 /**********************************************************************
  *		GetAsyncKeyState (X11DRV.@)
  */
-SHORT X11DRV_GetAsyncKeyState(INT key)
+SHORT CDECL X11DRV_GetAsyncKeyState(INT key)
 {
     SHORT retval;
 
@@ -1905,7 +1905,7 @@ SHORT X11DRV_GetAsyncKeyState(INT key)
 /***********************************************************************
  *		GetKeyboardLayout (X11DRV.@)
  */
-HKL X11DRV_GetKeyboardLayout(DWORD dwThreadid)
+HKL CDECL X11DRV_GetKeyboardLayout(DWORD dwThreadid)
 {
     if (!dwThreadid || dwThreadid == GetCurrentThreadId())
     {
@@ -1922,7 +1922,7 @@ HKL X11DRV_GetKeyboardLayout(DWORD dwThreadid)
 /***********************************************************************
  *		GetKeyboardLayoutName (X11DRV.@)
  */
-BOOL X11DRV_GetKeyboardLayoutName(LPWSTR name)
+BOOL CDECL X11DRV_GetKeyboardLayoutName(LPWSTR name)
 {
     static const WCHAR formatW[] = {'%','0','8','l','x',0};
     DWORD layout;
@@ -1945,7 +1945,7 @@ BOOL X11DRV_GetKeyboardLayoutName(LPWSTR name)
 /***********************************************************************
  *		LoadKeyboardLayout (X11DRV.@)
  */
-HKL X11DRV_LoadKeyboardLayout(LPCWSTR name, UINT flags)
+HKL CDECL X11DRV_LoadKeyboardLayout(LPCWSTR name, UINT flags)
 {
     FIXME("%s, %04x: stub!\n", debugstr_w(name), flags);
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -1956,7 +1956,7 @@ HKL X11DRV_LoadKeyboardLayout(LPCWSTR name, UINT flags)
 /***********************************************************************
  *		UnloadKeyboardLayout (X11DRV.@)
  */
-BOOL X11DRV_UnloadKeyboardLayout(HKL hkl)
+BOOL CDECL X11DRV_UnloadKeyboardLayout(HKL hkl)
 {
     FIXME("%p: stub!\n", hkl);
     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@@ -1967,7 +1967,7 @@ BOOL X11DRV_UnloadKeyboardLayout(HKL hkl)
 /***********************************************************************
  *		ActivateKeyboardLayout (X11DRV.@)
  */
-HKL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
+HKL CDECL X11DRV_ActivateKeyboardLayout(HKL hkl, UINT flags)
 {
     HKL oldHkl = 0;
     struct x11drv_thread_data *thread_data = x11drv_init_thread_data();
@@ -2030,7 +2030,7 @@ void X11DRV_MappingNotify( HWND dummy, XEvent *event )
  *
  * Note: Windows ignores HKL parameter and uses current active layout instead
  */
-SHORT X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
+SHORT CDECL X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
 {
     Display *display = thread_init_display();
     KeyCode keycode;
@@ -2122,7 +2122,7 @@ SHORT X11DRV_VkKeyScanEx(WCHAR wChar, HKL hkl)
 /***********************************************************************
  *		MapVirtualKeyEx (X11DRV.@)
  */
-UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
+UINT CDECL X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
 {
     Display *display = thread_init_display();
 
@@ -2265,7 +2265,7 @@ UINT X11DRV_MapVirtualKeyEx(UINT wCode, UINT wMapType, HKL hkl)
 /***********************************************************************
  *		GetKeyNameText (X11DRV.@)
  */
-INT X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize)
+INT CDECL X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize)
 {
   Display *display = thread_init_display();
   int vkey, ansi, scanCode;
@@ -2457,8 +2457,8 @@ static char KEYBOARD_MapDeadKeysym(KeySym keysym)
  * FIXME : should do the above (return 2 for non matching deadchar+char combinations)
  *
  */
-INT X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
-		     LPWSTR bufW, int bufW_size, UINT flags, HKL hkl)
+INT CDECL X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
+                               LPWSTR bufW, int bufW_size, UINT flags, HKL hkl)
 {
     Display *display = thread_init_display();
     XKeyEvent e;
@@ -2728,7 +2728,7 @@ found:
 /***********************************************************************
  *		Beep (X11DRV.@)
  */
-void X11DRV_Beep(void)
+void CDECL X11DRV_Beep(void)
 {
     wine_tsx11_lock();
     XBell(gdi_display, 0);
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 89587d8..b79f149 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -89,7 +89,7 @@ POINT cursor_pos;
 static DWORD last_time_modified;
 static RECT cursor_clip; /* Cursor clipping rect */
 
-BOOL X11DRV_SetCursorPos( INT x, INT y );
+BOOL CDECL X11DRV_SetCursorPos( INT x, INT y );
 
 
 /***********************************************************************
@@ -933,7 +933,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr )
 /***********************************************************************
  *		SetCursor (X11DRV.@)
  */
-void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
+void CDECL X11DRV_SetCursor( CURSORICONINFO *lpCursor )
 {
     struct x11drv_thread_data *data = x11drv_init_thread_data();
     Cursor cursor;
@@ -965,7 +965,7 @@ void X11DRV_SetCursor( CURSORICONINFO *lpCursor )
 /***********************************************************************
  *		SetCursorPos (X11DRV.@)
  */
-BOOL X11DRV_SetCursorPos( INT x, INT y )
+BOOL CDECL X11DRV_SetCursorPos( INT x, INT y )
 {
     Display *display = thread_init_display();
     POINT pt;
@@ -994,7 +994,7 @@ BOOL X11DRV_SetCursorPos( INT x, INT y )
 /***********************************************************************
  *		GetCursorPos (X11DRV.@)
  */
-BOOL X11DRV_GetCursorPos(LPPOINT pos)
+BOOL CDECL X11DRV_GetCursorPos(LPPOINT pos)
 {
     Display *display = thread_init_display();
     Window root, child;
@@ -1024,7 +1024,7 @@ BOOL X11DRV_GetCursorPos(LPPOINT pos)
  *
  * Set the cursor clipping rectangle.
  */
-BOOL X11DRV_ClipCursor( LPCRECT clip )
+BOOL CDECL X11DRV_ClipCursor( LPCRECT clip )
 {
     if (!IntersectRect( &cursor_clip, &virtual_screen_rect, clip ))
         cursor_clip = virtual_screen_rect;
diff --git a/dlls/winex11.drv/scroll.c b/dlls/winex11.drv/scroll.c
index 70b2f40..6b83426 100644
--- a/dlls/winex11.drv/scroll.c
+++ b/dlls/winex11.drv/scroll.c
@@ -60,8 +60,8 @@ static void dump_region( const char *p, HRGN hrgn)
 /*************************************************************************
  *		ScrollDC   (X11DRV.@)
  */
-BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *lprcScroll,
-                      const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate )
+BOOL CDECL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *lprcScroll,
+                              const RECT *lprcClip, HRGN hrgnUpdate, LPRECT lprcUpdate )
 {
     RECT rcSrc, rcClip, offset;
     INT dxdev, dydev, res;
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c
index 3527134..0292bd2 100644
--- a/dlls/winex11.drv/settings.c
+++ b/dlls/winex11.drv/settings.c
@@ -266,7 +266,7 @@ static BOOL write_registry_settings(const DEVMODEW *dm)
  *		EnumDisplaySettingsEx  (X11DRV.@)
  *
  */
-BOOL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DWORD flags)
+BOOL CDECL X11DRV_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DWORD flags)
 {
     static const WCHAR dev_name[CCHDEVICENAME] =
         { 'W','i','n','e',' ','X','1','1',' ','d','r','i','v','e','r',0 };
@@ -348,8 +348,8 @@ static const char * _DM_fields(DWORD fields)
  *		ChangeDisplaySettingsEx  (X11DRV.@)
  *
  */
-LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
-                                     HWND hwnd, DWORD flags, LPVOID lpvoid )
+LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
+                                             HWND hwnd, DWORD flags, LPVOID lpvoid )
 {
     DWORD i, dwBpp = 0;
     DEVMODEW dm;
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 1f45624..ac7eb70 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1475,7 +1475,7 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data
 /*****************************************************************
  *		SetWindowText   (X11DRV.@)
  */
-void X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
+void CDECL X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
 {
     Window win;
 
@@ -1492,7 +1492,7 @@ void X11DRV_SetWindowText( HWND hwnd, LPCWSTR text )
  *
  * Update the X state of a window to reflect a style change
  */
-void X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
+void CDECL X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
 {
     struct x11drv_win_data *data;
     DWORD changed;
@@ -1538,7 +1538,7 @@ void X11DRV_SetWindowStyle( HWND hwnd, INT offset, STYLESTRUCT *style )
 /***********************************************************************
  *		DestroyWindow   (X11DRV.@)
  */
-void X11DRV_DestroyWindow( HWND hwnd )
+void CDECL X11DRV_DestroyWindow( HWND hwnd )
 {
     struct x11drv_thread_data *thread_data = x11drv_thread_data();
     struct x11drv_win_data *data;
@@ -1629,7 +1629,7 @@ static struct x11drv_win_data *create_desktop_win_data( Display *display, HWND h
 /**********************************************************************
  *		CreateDesktopWindow   (X11DRV.@)
  */
-BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
+BOOL CDECL X11DRV_CreateDesktopWindow( HWND hwnd )
 {
     unsigned int width, height;
 
@@ -1671,7 +1671,7 @@ BOOL X11DRV_CreateDesktopWindow( HWND hwnd )
 /**********************************************************************
  *		CreateWindow   (X11DRV.@)
  */
-BOOL X11DRV_CreateWindow( HWND hwnd )
+BOOL CDECL X11DRV_CreateWindow( HWND hwnd )
 {
     if (hwnd == GetDesktopWindow() && root_window != DefaultRootWindow( gdi_display ))
     {
@@ -1797,7 +1797,7 @@ XIC X11DRV_get_ic( HWND hwnd )
 /***********************************************************************
  *		X11DRV_GetDC   (X11DRV.@)
  */
-void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,
+void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,
                    const RECT *top_rect, DWORD flags )
 {
     struct x11drv_escape_set_drawable escape;
@@ -1850,7 +1850,7 @@ void X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect,
 /***********************************************************************
  *		X11DRV_ReleaseDC  (X11DRV.@)
  */
-void X11DRV_ReleaseDC( HWND hwnd, HDC hdc )
+void CDECL X11DRV_ReleaseDC( HWND hwnd, HDC hdc )
 {
     struct x11drv_escape_set_drawable escape;
 
@@ -1870,7 +1870,7 @@ void X11DRV_ReleaseDC( HWND hwnd, HDC hdc )
 /***********************************************************************
  *		SetCapture  (X11DRV.@)
  */
-void X11DRV_SetCapture( HWND hwnd, UINT flags )
+void CDECL X11DRV_SetCapture( HWND hwnd, UINT flags )
 {
     struct x11drv_thread_data *thread_data = x11drv_thread_data();
 
@@ -1904,7 +1904,7 @@ void X11DRV_SetCapture( HWND hwnd, UINT flags )
 /*****************************************************************
  *		SetParent   (X11DRV.@)
  */
-void X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent )
+void CDECL X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent )
 {
     Display *display = thread_display();
     struct x11drv_win_data *data = X11DRV_get_win_data( hwnd );
@@ -1939,7 +1939,7 @@ void X11DRV_SetParent( HWND hwnd, HWND parent, HWND old_parent )
  *
  * Set the X focus.
  */
-void X11DRV_SetFocus( HWND hwnd )
+void CDECL X11DRV_SetFocus( HWND hwnd )
 {
     Display *display = thread_display();
     struct x11drv_win_data *data;
@@ -1968,8 +1968,8 @@ void X11DRV_SetFocus( HWND hwnd )
 /***********************************************************************
  *		WindowPosChanging   (X11DRV.@)
  */
-void X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
-                               const RECT *window_rect, const RECT *client_rect, RECT *visible_rect )
+void CDECL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
+                                       const RECT *window_rect, const RECT *client_rect, RECT *visible_rect )
 {
     struct x11drv_win_data *data = X11DRV_get_win_data( hwnd );
     DWORD style = GetWindowLongW( hwnd, GWL_STYLE );
@@ -1998,9 +1998,9 @@ void X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flags,
 /***********************************************************************
  *		WindowPosChanged   (X11DRV.@)
  */
-void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
-                              const RECT *rectWindow, const RECT *rectClient,
-                              const RECT *visible_rect, const RECT *valid_rects )
+void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
+                                      const RECT *rectWindow, const RECT *rectClient,
+                                      const RECT *visible_rect, const RECT *valid_rects )
 {
     struct x11drv_thread_data *thread_data;
     Display *display;
@@ -2111,7 +2111,7 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags,
 /***********************************************************************
  *           ShowWindow   (X11DRV.@)
  */
-UINT X11DRV_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
+UINT CDECL X11DRV_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
 {
     int x, y;
     unsigned int width, height, border, depth;
@@ -2161,7 +2161,7 @@ UINT X11DRV_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
  * This is not entirely correct, may need to create
  * an icon window and set the pixmap as a background
  */
-void X11DRV_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
+void CDECL X11DRV_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
 {
     Display *display = thread_display();
     struct x11drv_win_data *data;
@@ -2187,7 +2187,7 @@ void X11DRV_SetWindowIcon( HWND hwnd, UINT type, HICON icon )
  *
  * Assign specified region to window (for non-rectangular windows)
  */
-int X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
+int CDECL X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
 {
     struct x11drv_win_data *data;
 
@@ -2208,7 +2208,7 @@ int X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
  *
  * Set transparency attributes for a layered window.
  */
-void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
+void CDECL X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
 {
     struct x11drv_win_data *data = X11DRV_get_win_data( hwnd );
 
@@ -2228,7 +2228,7 @@ void X11DRV_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWO
 /**********************************************************************
  *           X11DRV_WindowMessage   (X11DRV.@)
  */
-LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
+LRESULT CDECL X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     struct x11drv_win_data *data;
 
@@ -2289,7 +2289,7 @@ static BOOL is_netwm_supported( Display *display, Atom atom )
  *
  * Perform WM_SYSCOMMAND handling.
  */
-LRESULT X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
+LRESULT CDECL X11DRV_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
 {
     WPARAM hittest = wparam & 0x0f;
     DWORD dwPoint;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index c488741..3041821 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -733,19 +733,19 @@ extern void make_window_embedded( Display *display, struct x11drv_win_data *data
 extern XContext winContext;
 
 extern void X11DRV_InitClipboard(void);
-extern int X11DRV_AcquireClipboard(HWND hWndClipWindow);
+extern int CDECL X11DRV_AcquireClipboard(HWND hWndClipWindow);
 extern void X11DRV_ResetSelectionOwner(void);
-extern void X11DRV_SetFocus( HWND hwnd );
+extern void CDECL X11DRV_SetFocus( HWND hwnd );
 extern Cursor X11DRV_GetCursor( Display *display, struct tagCURSORICONINFO *ptr );
-extern void X11DRV_SetCursor( struct tagCURSORICONINFO *lpCursor );
-extern BOOL X11DRV_ClipCursor( LPCRECT clip );
+extern void CDECL X11DRV_SetCursor( struct tagCURSORICONINFO *lpCursor );
+extern BOOL CDECL X11DRV_ClipCursor( LPCRECT clip );
 extern void X11DRV_InitKeyboard( Display *display );
 extern void X11DRV_send_keyboard_input( WORD wVk, WORD wScan, DWORD dwFlags, DWORD time,
                                         DWORD dwExtraInfo, UINT injected_flags );
 extern void X11DRV_send_mouse_input( HWND hwnd, DWORD flags, DWORD x, DWORD y,
                                      DWORD data, DWORD time, DWORD extra_info, UINT injected_flags );
-extern DWORD X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
-                                                 DWORD mask, DWORD flags );
+extern DWORD CDECL X11DRV_MsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles, DWORD timeout,
+                                                         DWORD mask, DWORD flags );
 
 typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void *arg );
 
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index b4e4bca..fd8a415 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -689,7 +689,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
  *
  * Returns the active status of the screen saver
  */
-BOOL X11DRV_GetScreenSaveActive(void)
+BOOL CDECL X11DRV_GetScreenSaveActive(void)
 {
     int timeout, temp;
     wine_tsx11_lock();
@@ -703,7 +703,7 @@ BOOL X11DRV_GetScreenSaveActive(void)
  *
  * Activate/Deactivate the screen saver
  */
-void X11DRV_SetScreenSaveActive(BOOL bActivate)
+void CDECL X11DRV_SetScreenSaveActive(BOOL bActivate)
 {
     int timeout, interval, prefer_blanking, allow_exposures;
     static int last_timeout = 15 * 60;
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c
index 0850026..2a66df5 100644
--- a/dlls/winex11.drv/xinerama.c
+++ b/dlls/winex11.drv/xinerama.c
@@ -204,7 +204,7 @@ void xinerama_init( unsigned int width, unsigned int height )
 /***********************************************************************
  *		X11DRV_GetMonitorInfo  (X11DRV.@)
  */
-BOOL X11DRV_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
+BOOL CDECL X11DRV_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
 {
     int i = monitor_to_index( handle );
 
@@ -225,7 +225,7 @@ BOOL X11DRV_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
 /***********************************************************************
  *		X11DRV_EnumDisplayMonitors  (X11DRV.@)
  */
-BOOL X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
+BOOL CDECL X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC proc, LPARAM lp )
 {
     int i;
 
-- 
1.5.6.5


--------------050001070501050206030307--



More information about the wine-patches mailing list