I want unhook all hook messages (ring 3) and not is able because in Java seems that not is possible the cast from int
for HHOOK
type.
Someone know how solve this?
import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.User32;
public static void main(String[] args) {
final User32 lib = User32.INSTANCE;
for(int i = 9999999; i >= 0; i--)
lib.UnhookWindowsHookEx((HHOOK(i)); // Here is the trouble
}
Thank you.