

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
6 messages in net.java.dev.jna.usersRE: [jna-users] Create a Block hook w...| From | Sent On | Attachments |
|---|---|---|
| Maxwell C. Xandeco | Apr 23, 2008 9:25 am | |
| Timothy Wall | Apr 23, 2008 12:13 pm | |
| Maxwell C. Xandeco | Apr 23, 2008 12:59 pm | |
| Timothy Wall | Apr 23, 2008 1:06 pm | |
| Daniel Kaufmann | Apr 23, 2008 5:55 pm | |
| Maxwell C. Xandeco | May 7, 2008 12:47 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: [jna-users] Create a Block hook with jna | Actions... |
|---|---|---|
| From: | Maxwell C. Xandeco (maxw...@fit-tecnologia.org.br) | |
| Date: | May 7, 2008 12:47:37 pm | |
| List: | net.java.dev.jna.users | |
I change the:
return lib.CallNextHookEx(hhk, nCode, wParam, info.getPointer());
to
return new LRESULT(1);
And the original target of keyboard don't receive the event.
-----Original Message----- From: Timothy Wall [mailto:twal...@dev.java.net] Sent: quarta-feira, 23 de abril de 2008 17:07 To: use...@jna.dev.java.net Subject: Re: [jna-users] Create a Block hook with jna
Unfortunately, the code executed by WH_KEYBOARD must reside within a DLL due to the way that the windows OS accesses the callback. I don't know any more than that, since the MS docs are light on the details of exactly *why* that is the case, or what the specific software requirements are for successful callback execution. There might be a workaround, there might not.
On Apr 23, 2008, at 4:00 PM, Maxwell C. Xandeco wrote:
Timothy, I have a native app that blocks the keyboard ,but I not have the source code,I only need to process the data before calling the next hook
I found a jna example that blocks the keyboard on:
https://jna.dev.java.net/nonav/issues/showattachment.cgi/11/contributi on .zip
I realized that in this example the type of hook used is WH_KEYBOARD, on KeyHook example the type used is WH_KEYBOARD_LL, i tried the following change:
hhk = lib.SetWindowsHookEx(User32.WH_KEYBOARD, keyboardHook, hMod, 0);
But don't works form me,nothing happens after register the hook.
I think that changing the type WH_KEYBOARD_LL to WH_KEYBOARD solve the
problem, you have some idea of how the type WH_KEYBOARD work in the example KeyHook.
Thanks.... Maxwell
-----Original Message----- From: Timothy Wall [mailto:twal...@dev.java.net] Sent: quarta-feira, 23 de abril de 2008 16:14 To: use...@jna.dev.java.net Subject: Re: [jna-users] Create a Block hook with jna
Do you have a native example that works? If you're trying something entirely new and you're not sure how to do it, throwing JNA in the mix
just adds to the uncertainty if you're not already familiar with it.
On Apr 23, 2008, at 12:26 PM, Maxwell C. Xandeco wrote:
Hi,
I need to create a block keyboard hook on windows, i need to receive
the vkCode and validate, if pass i call the next hook, else i ignore the key.
I tried with the example of svn (KeyHook) but I could not, this example call the code java after windows proccess, i need to call before and validate.
--------------------------------------------------------------------- To unsubscribe, e-mail: user...@jna.dev.java.net For additional commands, e-mail: user...@jna.dev.java.net
Legal Disclaimer:
The information contained in this message may be privileged and confidential. It
is intended to be read only by the individual or entity to whom it is addressed
or by their designee. If the reader of this message is not the intended
recipient, you are on notice that any distribution of this message, in any form,
is strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete or destroy any copy of this message







