Changed the return value of GetKeyboardState and SetKeyboardState from

VOID to BOOL.
This commit is contained in:
Francis Beaudet 1999-05-08 09:35:37 +00:00 committed by Alexandre Julliard
parent 428d298a64
commit ee3c1d7a27
2 changed files with 8 additions and 4 deletions

View File

@ -2883,7 +2883,7 @@ VOID WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,DWORD);
/* Declarations for functions that are the same in Win16 and Win32 */
VOID WINAPI EndMenu(void);
DWORD WINAPI GetDialogBaseUnits(void);
VOID WINAPI GetKeyboardState(LPBYTE);
BOOL WINAPI GetKeyboardState(LPBYTE);
DWORD WINAPI GetMenuCheckMarkDimensions(void);
LONG WINAPI GetMessageExtraInfo(void);
DWORD WINAPI GetMessagePos(void);
@ -2892,7 +2892,7 @@ DWORD WINAPI GetTickCount(void);
ATOM WINAPI GlobalDeleteAtom(ATOM);
DWORD WINAPI OemKeyScan(WORD);
BOOL WINAPI ReleaseCapture(void);
VOID WINAPI SetKeyboardState(LPBYTE);
BOOL WINAPI SetKeyboardState(LPBYTE);
VOID WINAPI WaitMessage(VOID);

View File

@ -460,7 +460,7 @@ INT16 WINAPI GetKeyState(INT vkey)
* keyboard-input message. This function retrieves the state of the keyboard
* at the time the input message was generated. (SDK 3.1 Vol 2. p 387)
*/
VOID WINAPI GetKeyboardState(LPBYTE lpKeyState)
BOOL WINAPI GetKeyboardState(LPBYTE lpKeyState)
{
TRACE_(key)("(%p)\n", lpKeyState);
if (lpKeyState != NULL) {
@ -469,12 +469,14 @@ VOID WINAPI GetKeyboardState(LPBYTE lpKeyState)
QueueKeyStateTable[VK_RBUTTON] = MouseButtonsStates[2] ? 0x80 : 0;
memcpy(lpKeyState, QueueKeyStateTable, 256);
}
return TRUE;
}
/**********************************************************************
* SetKeyboardState (USER.223)(USER32.484)
*/
VOID WINAPI SetKeyboardState(LPBYTE lpKeyState)
BOOL WINAPI SetKeyboardState(LPBYTE lpKeyState)
{
TRACE_(key)("(%p)\n", lpKeyState);
if (lpKeyState != NULL) {
@ -483,6 +485,8 @@ VOID WINAPI SetKeyboardState(LPBYTE lpKeyState)
MouseButtonsStates[1] = (QueueKeyStateTable[VK_MBUTTON] != 0);
MouseButtonsStates[2] = (QueueKeyStateTable[VK_RBUTTON] != 0);
}
return TRUE;
}
/**********************************************************************