From 66e46136e26d3acf25ae67cc47a93bd8dc4f0931 Mon Sep 17 00:00:00 2001 From: BoppreH Date: Mon, 14 Aug 2017 22:58:24 -0300 Subject: [PATCH] Use WinDLL instead of simple raw user32 --- keyboard/_winmouse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboard/_winmouse.py b/keyboard/_winmouse.py index d757e993..ef16dd42 100644 --- a/keyboard/_winmouse.py +++ b/keyboard/_winmouse.py @@ -9,7 +9,9 @@ from ._mouse_event import ButtonEvent, WheelEvent, MoveEvent, LEFT, RIGHT, MIDDLE, X, X2, UP, DOWN, DOUBLE, WHEEL, HORIZONTAL, VERTICAL -user32 = ctypes.windll.user32 +#https://github.com/boppreh/mouse/issues/1 +#user32 = ctypes.windll.user32 +user32 = ctypes.WinDLL('user32', use_last_error = True) class MSLLHOOKSTRUCT(Structure): _fields_ = [("x", c_long),