28 messages in net.java.dev.jna.usersRe: [jna-users] Win32 Service Callbacks
FromSent OnAttachments
Thomas BörkelAug 21, 2007 6:26 am 
Thomas BörkelAug 22, 2007 12:35 am 
Wayne MeissnerAug 22, 2007 4:38 pm 
Thomas BörkelAug 22, 2007 10:36 pm 
Timothy WallAug 31, 2007 7:23 am 
Thomas BörkelAug 31, 2007 7:47 am 
Timothy WallAug 31, 2007 7:55 am 
Thomas BörkelSep 3, 2007 6:29 am 
Thomas BörkelSep 3, 2007 1:11 pm 
Timothy WallSep 6, 2007 11:21 am 
Thomas BörkelSep 7, 2007 7:08 am 
Timothy WallSep 7, 2007 7:43 am 
Thomas BörkelSep 10, 2007 12:18 am 
Thomas BörkelSep 10, 2007 4:36 am 
Timothy WallSep 10, 2007 5:43 am 
Thomas BörkelSep 10, 2007 6:49 am 
Timothy WallSep 11, 2007 4:47 am 
Thomas BörkelSep 11, 2007 6:15 am 
Timothy WallSep 11, 2007 6:47 am 
Thomas BörkelSep 11, 2007 6:52 am 
Timothy WallSep 11, 2007 8:52 am 
Thomas BörkelSep 11, 2007 10:26 pm 
Timothy WallSep 12, 2007 5:45 am 
Thomas BörkelSep 12, 2007 5:56 am 
Timothy WallSep 12, 2007 6:19 am 
Thomas BörkelSep 12, 2007 7:09 am 
Timothy WallSep 12, 2007 8:17 am 
Thomas BörkelSep 13, 2007 12:58 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Win32 Service CallbacksActions...
From:Thomas Börkel (tho@boerkel.de)
Date:Sep 10, 2007 12:18:41 am
List:net.java.dev.jna.users

HI!

Timothy Wall wrote:

I tried putting some fprintf(stderr...) in several places in the JNA native code, but nothing appeared on stderr. I also tried to do fopen() and write to some file and nothing again.

stderr is not reliable when used in conjunction with a VM; it's not well-defined what the VM does with its stdout/stderr streams. writing to a file is a much better idea, albeit somewhat awkward.

I tried writing to a file from within the jna.dll with "normal" clib file operations (fopen, etc.) but it does not write to the file. The same code works fine within a standard C program.

Also my machine froze several times while compiling the native code with NB 5.5.1 and cygwin gc++... So, I gave up on that.

I do all my native builds from a cygwin shell; I'll sometimes do code builds/tests from eclipse, but only after copying the native dll into eclipse's build tree. I trust the shell's process management more than an IDE's.

I have ti try that, although NetBeans just calls make AFAIK.

If callback_dispatch is never called, then something must be wrong at either the service or the libffi layers.

In desperation, I moved everything to a Windows Server 2003 machine and there the ServiceControl callback works!

So, the fact that one Callback is called and the 2nd not must have something to do with Windows Vista!

Glad to hear you made some progress. Can you run the JNA test suite without problems on Vista? Are there any service-related release

Yes, all tests pass on Vista.

notes/tech notes for Vista? You should check MSDN to see if there are any known issues.

I will. However, the same service written in C works fine on Vista. So I guess, it's a problem with JNA and Vista.

Thomas