From ec1dcd341ec942e8d233211d3714216d0f06a2b9 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Wed, 5 Mar 2014 12:36:04 +0000 Subject: [PATCH] [USER32] * Mark some APIs as hotpatchable. CORE-7959 svn path=/trunk/; revision=62430 --- .../win32ss/user/user32/controls/scrollbar.c | 29 ++++++++++++++----- reactos/win32ss/user/user32/misc/stubs.c | 2 ++ reactos/win32ss/user/user32/windows/class.c | 1 + .../win32ss/user/user32/windows/cursoricon.c | 2 ++ reactos/win32ss/user/user32/windows/defwnd.c | 8 +++-- reactos/win32ss/user/user32/windows/input.c | 8 +++-- reactos/win32ss/user/user32/windows/message.c | 21 ++++++++++---- .../win32ss/user/user32/windows/nonclient.c | 8 +++-- reactos/win32ss/user/user32/windows/window.c | 20 +++++++++---- 9 files changed, 76 insertions(+), 23 deletions(-) diff --git a/reactos/win32ss/user/user32/controls/scrollbar.c b/reactos/win32ss/user/user32/controls/scrollbar.c index 7edd2226589..222ec43e2e0 100644 --- a/reactos/win32ss/user/user32/controls/scrollbar.c +++ b/reactos/win32ss/user/user32/controls/scrollbar.c @@ -1438,7 +1438,10 @@ ScrollBarWndProcA(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) /* * @implemented */ -BOOL WINAPI EnableScrollBar( HWND hwnd, UINT nBar, UINT flags ) +BOOL +WINAPI +DECLSPEC_HOTPATCH +EnableScrollBar( HWND hwnd, UINT nBar, UINT flags ) { BOOL Hook, Ret = FALSE; @@ -1499,7 +1502,9 @@ RealGetScrollInfo(HWND Wnd, INT SBType, LPSCROLLINFO Info) /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH GetScrollInfo(HWND Wnd, INT SBType, LPSCROLLINFO Info) { BOOL Hook, Ret = FALSE; @@ -1528,7 +1533,9 @@ GetScrollInfo(HWND Wnd, INT SBType, LPSCROLLINFO Info) /* * @implemented */ -INT WINAPI +INT +WINAPI +DECLSPEC_HOTPATCH GetScrollPos(HWND Wnd, INT Bar) { PWND pwnd; @@ -1563,7 +1570,9 @@ GetScrollPos(HWND Wnd, INT Bar) /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH GetScrollRange(HWND Wnd, int Bar, LPINT MinPos, LPINT MaxPos) { PWND pwnd; @@ -1615,7 +1624,9 @@ RealSetScrollInfo(HWND Wnd, int SBType, LPCSCROLLINFO Info, BOOL bRedraw) /* * @implemented */ -INT WINAPI +INT +WINAPI +DECLSPEC_HOTPATCH SetScrollInfo(HWND Wnd, int SBType, LPCSCROLLINFO Info, BOOL bRedraw) { BOOL Hook; @@ -1646,7 +1657,9 @@ SetScrollInfo(HWND Wnd, int SBType, LPCSCROLLINFO Info, BOOL bRedraw) /* * @implemented */ -INT WINAPI +INT +WINAPI +DECLSPEC_HOTPATCH SetScrollPos(HWND hWnd, INT nBar, INT nPos, BOOL bRedraw) { SCROLLINFO ScrollInfo; @@ -1661,7 +1674,9 @@ SetScrollPos(HWND hWnd, INT nBar, INT nPos, BOOL bRedraw) /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH SetScrollRange(HWND hWnd, INT nBar, INT nMinPos, INT nMaxPos, BOOL bRedraw) { PWND pWnd; diff --git a/reactos/win32ss/user/user32/misc/stubs.c b/reactos/win32ss/user/user32/misc/stubs.c index d349de50d70..aa445c91b12 100644 --- a/reactos/win32ss/user/user32/misc/stubs.c +++ b/reactos/win32ss/user/user32/misc/stubs.c @@ -297,6 +297,7 @@ DefRawInputProc( */ UINT WINAPI +DECLSPEC_HOTPATCH GetRawInputBuffer( PRAWINPUT pData, PUINT pcbSize, @@ -359,6 +360,7 @@ GetRegisteredRawInputDevices( */ BOOL WINAPI +DECLSPEC_HOTPATCH RegisterRawInputDevices( PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, diff --git a/reactos/win32ss/user/user32/windows/class.c b/reactos/win32ss/user/user32/windows/class.c index 4a5e6b31f63..00d84cfa5b2 100644 --- a/reactos/win32ss/user/user32/windows/class.c +++ b/reactos/win32ss/user/user32/windows/class.c @@ -1832,6 +1832,7 @@ SetWindowWord ( HWND hWnd,int nIndex,WORD wNewWord ) */ LONG WINAPI +DECLSPEC_HOTPATCH SetWindowLongA( HWND hWnd, int nIndex, diff --git a/reactos/win32ss/user/user32/windows/cursoricon.c b/reactos/win32ss/user/user32/windows/cursoricon.c index cfe5aa0dd43..150b56f714f 100644 --- a/reactos/win32ss/user/user32/windows/cursoricon.c +++ b/reactos/win32ss/user/user32/windows/cursoricon.c @@ -2112,6 +2112,7 @@ CursorIconToCursor(HICON hIcon, */ BOOL WINAPI +DECLSPEC_HOTPATCH SetCursorPos(int X, int Y) { return NtUserxSetCursorPos(X,Y); @@ -2122,6 +2123,7 @@ SetCursorPos(int X, int Y) */ BOOL WINAPI +DECLSPEC_HOTPATCH GetCursorPos(LPPOINT lpPoint) { BOOL res; diff --git a/reactos/win32ss/user/user32/windows/defwnd.c b/reactos/win32ss/user/user32/windows/defwnd.c index e6d2e1bbba7..b15d15ba3ce 100644 --- a/reactos/win32ss/user/user32/windows/defwnd.c +++ b/reactos/win32ss/user/user32/windows/defwnd.c @@ -36,7 +36,9 @@ static short iMenuSysKey = 0; /* * @implemented */ -DWORD WINAPI +DWORD +WINAPI +DECLSPEC_HOTPATCH GetSysColor(int nIndex) { if(nIndex >= 0 && nIndex < NUM_SYSCOLORS) @@ -51,7 +53,9 @@ GetSysColor(int nIndex) /* * @implemented */ -HBRUSH WINAPI +HBRUSH +WINAPI +DECLSPEC_HOTPATCH GetSysColorBrush(int nIndex) { if(nIndex >= 0 && nIndex < NUM_SYSCOLORS) diff --git a/reactos/win32ss/user/user32/windows/input.c b/reactos/win32ss/user/user32/windows/input.c index 3e50a2901ce..78bfb670970 100644 --- a/reactos/win32ss/user/user32/windows/input.c +++ b/reactos/win32ss/user/user32/windows/input.c @@ -114,7 +114,9 @@ EnableWindow(HWND hWnd, BOOL bEnable) /* * @implemented */ -SHORT WINAPI +SHORT +WINAPI +DECLSPEC_HOTPATCH GetAsyncKeyState(int vKey) { if (vKey < 0 || vKey > 256) @@ -185,7 +187,9 @@ GetKeyNameTextW(LONG lParam, /* * @implemented */ -SHORT WINAPI +SHORT +WINAPI +DECLSPEC_HOTPATCH GetKeyState(int nVirtKey) { return (SHORT)NtUserGetKeyState((DWORD)nVirtKey); diff --git a/reactos/win32ss/user/user32/windows/message.c b/reactos/win32ss/user/user32/windows/message.c index 7e0f0b25784..afd066e1eff 100644 --- a/reactos/win32ss/user/user32/windows/message.c +++ b/reactos/win32ss/user/user32/windows/message.c @@ -1908,7 +1908,9 @@ CallWindowProcW(WNDPROC lpPrevWndFunc, /* * @implemented */ -LRESULT WINAPI +LRESULT +WINAPI +DECLSPEC_HOTPATCH DispatchMessageA(CONST MSG *lpmsg) { LRESULT Ret = 0; @@ -2000,7 +2002,9 @@ DispatchMessageA(CONST MSG *lpmsg) /* * @implemented */ -LRESULT WINAPI +LRESULT +WINAPI +DECLSPEC_HOTPATCH DispatchMessageW(CONST MSG *lpmsg) { LRESULT Ret = 0; @@ -2100,7 +2104,9 @@ IntConvertMsgToAnsi(LPMSG lpMsg) /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH GetMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, @@ -2128,7 +2134,9 @@ GetMessageA(LPMSG lpMsg, /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH GetMessageW(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, @@ -2191,7 +2199,9 @@ PeekMessageWorker( PMSG pMsg, /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH PeekMessageA(LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, @@ -2217,6 +2227,7 @@ PeekMessageA(LPMSG lpMsg, */ BOOL WINAPI +DECLSPEC_HOTPATCH PeekMessageW( LPMSG lpMsg, HWND hWnd, diff --git a/reactos/win32ss/user/user32/windows/nonclient.c b/reactos/win32ss/user/user32/windows/nonclient.c index 1f8803a4aa5..890bc2af5e3 100644 --- a/reactos/win32ss/user/user32/windows/nonclient.c +++ b/reactos/win32ss/user/user32/windows/nonclient.c @@ -1233,7 +1233,9 @@ RealAdjustWindowRectEx(LPRECT lpRect, /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH AdjustWindowRectEx(LPRECT lpRect, DWORD dwStyle, BOOL bMenu, @@ -1266,7 +1268,9 @@ AdjustWindowRectEx(LPRECT lpRect, /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH AdjustWindowRect(LPRECT lpRect, DWORD dwStyle, BOOL bMenu) diff --git a/reactos/win32ss/user/user32/windows/window.c b/reactos/win32ss/user/user32/windows/window.c index 1b479294e4b..452237951ee 100644 --- a/reactos/win32ss/user/user32/windows/window.c +++ b/reactos/win32ss/user/user32/windows/window.c @@ -322,7 +322,9 @@ cleanup: /* * @implemented */ -HWND WINAPI +HWND +WINAPI +DECLSPEC_HOTPATCH CreateWindowExA(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, @@ -445,7 +447,9 @@ CreateWindowExA(DWORD dwExStyle, /* * @implemented */ -HWND WINAPI +HWND +WINAPI +DECLSPEC_HOTPATCH CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, @@ -1143,7 +1147,9 @@ GetTopWindow(HWND hWnd) /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH GetWindowInfo(HWND hWnd, PWINDOWINFO pwi) { @@ -1636,7 +1642,9 @@ return NtUserCallOneParam( (DWORD_PTR)dwDefaultLayout, ONEPARAM_ROUTINE_SETPROCD /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH SetWindowTextA(HWND hWnd, LPCSTR lpString) { @@ -1659,7 +1667,9 @@ SetWindowTextA(HWND hWnd, /* * @implemented */ -BOOL WINAPI +BOOL +WINAPI +DECLSPEC_HOTPATCH SetWindowTextW(HWND hWnd, LPCWSTR lpString) {