LeVanPhuUIT / jnativehook

Automatically exported from code.google.com/p/jnativehook
0 stars 0 forks source link

"Failed to create low level event hook" #48

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
So, I wanted to use this library for an APM-Meter. It worked fine at first, but 
then I got the following:

org.jnativehook.NativeHookException: Failed to create low level event hook
    at org.jnativehook.GlobalScreen.registerNativeHook(Native Method)

I do not know what caused this, but it appeared after I built my project into 
the jar and now appears independently of running it from the IDE (IntelliJ IDEA 
12.1.3) or from the .jar file. I am using version 1.1.4 of this library on Win7 
64-bit.

Sometimes, it doesn't throw an exception, but instead just does nothing.

Original issue reported on code.google.com by regimar...@googlemail.com on 18 May 2013 at 4:30

GoogleCodeExporter commented 9 years ago
Ok, worked fine today, even after starting it from the .jar and the IDE several 
times. So reproducing will be pretty hard to impossible for this one =(

Original comment by regimar...@googlemail.com on 19 May 2013 at 8:11

GoogleCodeExporter commented 9 years ago
That error only occurs when SetWindowsHookEx() returns null.  There isn't a 
whole lot of documentation that outlines why that may occur, but I will add in 
some more detailed information to the exception in version 1.1.5.

Original comment by a...@1stleg.com on 20 May 2013 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by a...@1stleg.com on 20 May 2013 at 5:45

GoogleCodeExporter commented 9 years ago
This should be resolved as of 1.2.0-Beta1.  I have added GetLastError() to the 
error logger to get more information in case this happens again.

Original comment by a...@1stleg.com on 22 Jan 2014 at 7:37

GoogleCodeExporter commented 9 years ago
I just got the same error without a clear reason. It just started throwing this 
error after maybe 20 to 30 runs. I am using version 2.0.1.

Original comment by pandak...@gmail.com on 3 Jun 2015 at 3:58