Win32 Service API and SERVICE_CONTROL_SHUTDOWN#258
Win32 Service API and SERVICE_CONTROL_SHUTDOWN#258hakanai wants to merge 6 commits intojava-native-access:masterfrom hakanai:patch-1
Conversation
SERVICE_CONTROL_SHUTDOWN is used from the ntservice contrib module's own copy of Winsvc, so not having it in core blocks any plans to decommission that ntservice stuff.
ntservice had an Advapi32 with some methods and structures which weren't in the main platform one. These were copied over verbatim, though I noticed some potentially questionable things while doing so, which should probably be fixed in following commits if they are deemed to matter.
|
Can you merge this from upstream, please. |
|
Also, do update CHANGELOG, thx. |
|
I'll update the changelog but I don't know what you mean by the other thing. |
|
See it says that this cannot be automatically merged here? |
There was a problem hiding this comment.
Missing a dot at the end of this line (it's a sentence).
There was a problem hiding this comment.
(a) It doesn't read like one.
(b) The period goes inside the parentheses in that situation (that's called Skitt's Law.)
|
Merged from upstream. Even though I thought I had already pulled all changes before I started, I apparently hadn't... Since the changelog line conflicted too, I put the period on the end, while chuckling about the irony that your own committers aren't doing it (see the few lines around mine.) |
|
Thanks. This looks good, but the service functions need unit tests (we keep full coverage in platform.win32). I'm happy to write those, but it will have to wait some. |
|
Bump. I didn't get to this yet. Please don't hesitate to update with tests. |
The ntservice poject contained additional definitions for windows service related functionality. Unittests are added in the form of a sample service implementation, that is installed/uninstalled and invoked. com.sun.jna.platform.win32.Advapi32: - StartServiceCtrlDispatcher - RegisterServiceCtrlHandler - RegisterServiceCtrlHandlerEx - SetServiceStatus - CreateService - DeleteService com.sun.jna.platform.win32.Winsvc: - Handler - HandlerEx - SERVICE_MAIN_FUNCTION - SERVICE_TABLE_ENTRY - SERVICE_DESCRIPTION - SERVICE_STATUS_HANDLE Closes: java-native-access#821 Closes: java-native-access#258
The ntservice poject contained additional definitions for windows service related functionality. Unittests are added in the form of a sample service implementation, that is installed/uninstalled and invoked. com.sun.jna.platform.win32.Advapi32: - StartServiceCtrlDispatcher - RegisterServiceCtrlHandler - RegisterServiceCtrlHandlerEx - SetServiceStatus - CreateService - DeleteService com.sun.jna.platform.win32.Winsvc: - Handler - HandlerEx - SERVICE_MAIN_FUNCTION - SERVICE_TABLE_ENTRY - SERVICE_DESCRIPTION - SERVICE_STATUS_HANDLE Closes: java-native-access#821 Closes: java-native-access#258
…ative-access#258) Motivation: Sometimes a user may want to use a custom fork of either quiche or boringssl but for this the pom.xml needs to be adjusted. We should just allow to override the repository urls. Modifications: Allow to override the repository urls by using -D ... Result: Easier to use own forks of quiche or boringssl
SERVICE_CONTROL_SHUTDOWN is used from the ntservice contrib module's own copy of Winsvc, so not having it in contrib/platform blocks any plans to decommission that ntservice stuff.
I also moved out Advapi32. As far as I know, this is everything in Win32Service which wasn't already in contrib/platform, so it should be possible to remove the JNA interface stuff from contrib/ntservice now.