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:Timothy Wall (twal@dev.java.net)
Date:Sep 10, 2007 5:43:07 am
List:net.java.dev.jna.users

It'd be really cool to include a Java w32 service wrapper (perhaps as an abstract class) in the JNA contrib area. Is your minimal C wrapper required to launch java.exe, or would it be possible to install the service without it? I notice some service definitions have both an .exe and arguments defined, so it seems like that should be possible for java (e.g. java.exe -classpath ... <classname>).

On Sep 10, 2007, at 7:36 AM, Thomas Börkel wrote:

C definition:

SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx( LPCTSTR lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext

DWORD WINAPI HandlerEx( DWORD dwControl, DWORD dwEventType, LPVOID lpEventData, LPVOID lpContext );

Java:

public Pointer RegisterServiceCtrlHandlerEx(String lpServiceName, WINSVC.HANDLER_FUNCTION_EX lpHandlerProc, Pointer lpContext);

interface HANDLER_FUNCTION_EX extends StdCallCallback { public void callback(int dwControl, int dwEventType, Pointer lpEventData, Pointer lpContext); }

So for the moment, at least, the "ex" versions are required for the service to run under Vista.