

![]() | 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: |
10 messages in net.java.dev.jna.usersRe: [jna-users] Re: Kernel32 Waking H...| From | Sent On | Attachments |
|---|---|---|
| Dale...@coats.com | Apr 24, 2008 6:34 pm | |
| Dale...@coats.com | Apr 28, 2008 5:01 pm | |
| Timothy Wall | Apr 29, 2008 10:13 am | |
| Dale...@coats.com | Apr 30, 2008 9:24 am | |
| Dale...@coats.com | Apr 30, 2008 10:10 am | |
| Timothy Wall | May 1, 2008 5:58 am | |
| Dale...@coats.com | May 1, 2008 7:37 am | |
| Timothy Wall | May 1, 2008 8:07 am | |
| Timothy Wall | May 1, 2008 8:35 am | |
| Dale...@coats.com | May 1, 2008 10:12 am |

![]() | 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] Re: Kernel32 Waking Hibernating Machine | Actions... |
|---|---|---|
| From: | Timothy Wall (twal...@dev.java.net) | |
| Date: | Apr 29, 2008 10:13:46 am | |
| List: | net.java.dev.jna.users | |
You might check to see if the VM itself is set up to respond to any OS signals (like sleep). There is also an -Xrs switch to the VM to reduce the VM's use of OS signals.
You should also check to see if there are any "minor" wake from sleep dependencies or requirements that you might have overlooked in the w32 api.
Other than having more dependent dlls, I don't see any difference between your mapping and a simple C program.
On Apr 28, 2008, at 8:01 PM, Dale...@coats.com wrote:
This same technique works when coded in C language, so I think it must be something different in the way JNA handles it.
HANDLE htimer = kernel32.CreateWaitableTimer(null, true, "MyWaitableTimer"); boolean setTimerResult = kernel32.SetWaitableTimer(htimer, pDueTime, 0L,null, null, true); int waitResult = kernel32.WaitForSingleObject(htimer,Integer.MAX_VALUE);
The last line, above, appropriately blocks execution, even in the JNA version, then continues after the timer fires, when the machine is awake. The difference is that if the machine is sleeping, only the C version wakes the machine when the timer fires, the JNA version does not.
Anybody have any clues, or am I outta luck?
--Dale--
*************************************************** This communication may be confidential and privileged and the views expressed herein may be personal and are not necessarily the views of Coats plc. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s), please note that any distribution, copying or use of this communication or the information in it is strictly prohibited. If you have received this communication in error, please notify us by email (Apps...@coats.com ) or telephone our technical support helpdesk at Coats plc. +44 (0)20 8210 5100 (UK 0830H - 1800H, Mon-Fri, GMT) and then delete the email and any copies of it. ***************************************************







