diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index d3e78bb473d..b6a3b3661f7 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -449,7 +449,7 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA } if (info->id == WH_KEYBOARD_LL || info->id == WH_MOUSE_LL) - interlocked_xchg_add( &global_key_state_counter, 1 ); /* force refreshing the key state cache */ + InterlockedIncrement( &global_key_state_counter ); /* force refreshing the key state cache */ return ret; } diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 0325e2ce3df..b7cdbd84efc 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -433,7 +433,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key ) * (like Adobe Photoshop CS5) expect that changes to the async key state * are also immediately available in other threads. */ if (prev_key_state != key_state_info->state[key]) - counter = interlocked_xchg_add( &global_key_state_counter, 1 ) + 1; + counter = InterlockedIncrement( &global_key_state_counter ); key_state_info->time = GetTickCount(); key_state_info->counter = counter;