user32: Make ToAscii(Ex) and ToUnicode(Ex) prototypes match PSDK.

Dmitry Timoshkov dmitry at codeweavers.com
Mon Oct 27 05:23:02 CDT 2008


---
 dlls/user32/driver.c        |    4 ++--
 dlls/user32/input.c         |    8 ++++----
 dlls/user32/user_private.h  |    2 +-
 dlls/winex11.drv/keyboard.c |    2 +-
 include/winuser.h           |    8 ++++----
 5 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index 9588308..ed3375f 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -202,7 +202,7 @@ static UINT nulldrv_SendInput( UINT count, LPINPUT inputs, int size )
     return 0;
 }
 
-static INT nulldrv_ToUnicodeEx( UINT virt, UINT scan, LPBYTE state, LPWSTR str,
+static INT nulldrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str,
                                 int size, UINT flags, HKL layout )
 {
     return 0;
@@ -549,7 +549,7 @@ static UINT loaderdrv_SendInput( UINT count, LPINPUT inputs, int size )
     return load_driver()->pSendInput( count, inputs, size );
 }
 
-static INT loaderdrv_ToUnicodeEx( UINT virt, UINT scan, LPBYTE state, LPWSTR str,
+static INT 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 );
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 8891f59..dce50b5 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -729,7 +729,7 @@ INT WINAPI GetKeyNameTextW(LONG lParam, LPWSTR lpBuffer, INT nSize)
 /****************************************************************************
  *		ToUnicode (USER32.@)
  */
-INT WINAPI ToUnicode(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
+INT WINAPI ToUnicode(UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
 		     LPWSTR lpwStr, int size, UINT flags)
 {
     return ToUnicodeEx(virtKey, scanCode, lpKeyState, lpwStr, size, flags, GetKeyboardLayout(0));
@@ -738,7 +738,7 @@ INT WINAPI ToUnicode(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
 /****************************************************************************
  *		ToUnicodeEx (USER32.@)
  */
-INT WINAPI ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
+INT WINAPI ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
 		       LPWSTR lpwStr, int size, UINT flags, HKL hkl)
 {
     return USER_Driver->pToUnicodeEx(virtKey, scanCode, lpKeyState, lpwStr, size, flags, hkl);
@@ -747,7 +747,7 @@ INT WINAPI ToUnicodeEx(UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
 /****************************************************************************
  *		ToAscii (USER32.@)
  */
-INT WINAPI ToAscii( UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
+INT WINAPI ToAscii( UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
                     LPWORD lpChar, UINT flags )
 {
     return ToAsciiEx(virtKey, scanCode, lpKeyState, lpChar, flags, GetKeyboardLayout(0));
@@ -756,7 +756,7 @@ INT WINAPI ToAscii( UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
 /****************************************************************************
  *		ToAsciiEx (USER32.@)
  */
-INT WINAPI ToAsciiEx( UINT virtKey, UINT scanCode, LPBYTE lpKeyState,
+INT WINAPI ToAsciiEx( UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
                       LPWORD lpChar, UINT flags, HKL dwhkl )
 {
     WCHAR uni_chars[2];
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index 40e57e1..744a141 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -114,7 +114,7 @@ typedef struct tagUSER_DRIVER {
     HKL    (*pLoadKeyboardLayout)(LPCWSTR, UINT);
     UINT   (*pMapVirtualKeyEx)(UINT, UINT, HKL);
     UINT   (*pSendInput)(UINT, LPINPUT, int);
-    INT    (*pToUnicodeEx)(UINT, UINT, LPBYTE, LPWSTR, int, UINT, HKL);
+    INT    (*pToUnicodeEx)(UINT, UINT, const BYTE *, LPWSTR, int, UINT, HKL);
     BOOL   (*pUnloadKeyboardLayout)(HKL);
     SHORT  (*pVkKeyScanEx)(WCHAR, HKL);
     /* mouse functions */
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index 5c501eb..ee2773b 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -2439,7 +2439,7 @@ 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, LPBYTE lpKeyState,
+INT X11DRV_ToUnicodeEx(UINT virtKey, UINT scanCode, const BYTE *lpKeyState,
 		     LPWSTR bufW, int bufW_size, UINT flags, HKL hkl)
 {
     Display *display = thread_init_display();
diff --git a/include/winuser.h b/include/winuser.h
index 40bf20a..142837f 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -5022,10 +5022,10 @@ WINUSERAPI LONG        WINAPI TabbedTextOutA(HDC,INT,INT,LPCSTR,INT,INT,const IN
 WINUSERAPI LONG        WINAPI TabbedTextOutW(HDC,INT,INT,LPCWSTR,INT,INT,const INT*,INT);
 #define                       TabbedTextOut WINELIB_NAME_AW(TabbedTextOut)
 WINUSERAPI WORD        WINAPI TileWindows (HWND,UINT,const RECT *,UINT,const HWND *);
-WINUSERAPI INT         WINAPI ToAscii(UINT,UINT,LPBYTE,LPWORD,UINT);
-WINUSERAPI INT         WINAPI ToAsciiEx(UINT,UINT,LPBYTE,LPWORD,UINT,HKL);
-WINUSERAPI INT         WINAPI ToUnicode(UINT,UINT,PBYTE,LPWSTR,int,UINT);
-WINUSERAPI INT         WINAPI ToUnicodeEx(UINT,UINT,LPBYTE,LPWSTR,int,UINT,HKL);
+WINUSERAPI INT         WINAPI ToAscii(UINT,UINT,const BYTE *,LPWORD,UINT);
+WINUSERAPI INT         WINAPI ToAsciiEx(UINT,UINT,const BYTE *,LPWORD,UINT,HKL);
+WINUSERAPI INT         WINAPI ToUnicode(UINT,UINT,const BYTE *,LPWSTR,int,UINT);
+WINUSERAPI INT         WINAPI ToUnicodeEx(UINT,UINT,const BYTE *,LPWSTR,int,UINT,HKL);
 WINUSERAPI BOOL        WINAPI TrackMouseEvent(LPTRACKMOUSEEVENT);
 WINUSERAPI BOOL        WINAPI TrackPopupMenu(HMENU,UINT,INT,INT,INT,HWND,const RECT*);
 WINUSERAPI BOOL        WINAPI TrackPopupMenuEx(HMENU,UINT,INT,INT,HWND,LPTPMPARAMS);
-- 
1.6.0.3




More information about the wine-patches mailing list