Commit Graph

259 Commits

Author SHA1 Message Date
Andrew Eikum e5294a7414 advapi32: Also wait on services without a control thread during shutdown.
Tested service messages during OS shutdown manually on Windows 7.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 19:39:12 +01:00
Andrew Eikum 1f88b90b74 advapi32: Implement NotifyServiceStatusChange.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-23 18:28:38 +01:00
Andrew Eikum 9c95bfcc30 advapi: Fix return value for QueryServiceConfig2W.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-03 23:27:06 +01:00
Hans Leidekker 251c9ccff7 advapi32: Fix QueryServiceConfig2 on Wow64.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 21:06:52 +01:00
Hans Leidekker 445996d31b advapi32: Fix EnumServicesStatusEx on Wow64.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 21:06:48 +01:00
Hans Leidekker ac0744d450 advapi32: Fix EnumServicesStatus on Wow64.
The structures returned by this function contain pointers, which breaks on Wow64 if
the client is 32-bit (the service manager always runs in a 64-bit process).

This patch introduces a variant of ENUM_SERVICE_STATUS with offsets instead of pointers
and converts the structures on the client side.

The downside is that we need to buffer the data, but in return we can get rid of the
dummy buffer pointer.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 21:06:40 +01:00
Austin English e2283db410 advapi32: Only show NotifyServiceStatusChangeW FIXME once.
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-01 09:22:43 +02:00
Sebastian Lackner 1c5affa205 advapi32: Unify service startup and control handling.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-31 22:22:59 +09:00
Sebastian Lackner 2263baaf2e advapi32: Do not stop service main thread as long as there are still running services.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Sebastian Lackner 13bb213aeb advapi32: Hold lock while handling service thread shutdown.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Sebastian Lackner 63c36da6da advapi32: Hold lock while processing service controls.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:37 +09:00
Sebastian Lackner f4590e91eb advapi32: Simplify RegisterServiceCtrlHandlerExW.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-18 00:09:36 +09:00
Sebastian Lackner 8f8626feef services: Implement functionality to transfer extra data when sending service control.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 16:17:29 +09:00
Sebastian Lackner 7a200887bb advapi32: Validate received service name.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-10 16:16:49 +09:00
Francois Gouget fbc5935764 advapi32: Fix compilation on systems that don't support nameless unions. 2015-03-02 13:48:57 +09:00
Nikolay Sivov daf0af4313 advapi32: Forward to CreateServiceWOW64W() when appropriate. 2015-02-27 14:20:25 +09:00
Nikolay Sivov 0f80d4b619 services: Make RPC interface compatible with native. 2015-02-27 14:20:24 +09:00
Nikolay Sivov 7520297a49 advapi32: Fix trace format for access mask in OpenService(). 2015-02-27 14:20:23 +09:00
Andrew Eikum afa965a152 advapi32: Partially implement NotifyServiceStatusChangeW. 2015-02-26 23:05:12 +09:00
Nikolay Sivov c0b0d3b4e2 services: Pass resume index to server. 2015-02-25 20:35:23 +09:00
Nikolay Sivov 3c186a65d3 services: Make ChangeServiceConfig2W() rpc call compatible with native one. 2015-02-25 20:35:23 +09:00
Nikolay Sivov 65a468ef74 advapi32: Use heap* helpers in service code. 2014-08-25 10:54:50 +02:00
Nikolay Sivov 6a4c146962 services: Defer service delete until all handles are closed. 2014-06-12 18:24:17 +02:00
André Hentschel 929d9fb9f7 advapi32: Use boolean return values in boolean functions. 2014-02-04 11:15:18 +01:00
Alexander Morozov a792a5b486 advapi32: Do not terminate a regular program if it calls StartServiceCtrlDispatcher. 2013-04-02 15:03:29 +02:00
Jimmy Rentz c61df08543 advapi32: Fix segfault in OpenService. 2013-03-25 16:21:17 +01:00
Erich Hoover 08238b83b8 advapi32: Support service objects in GetNamedSecurityInfo. 2013-01-31 12:08:59 +01:00
Erich Hoover e4717c299e advapi32: Support service objects in SetSecurityInfo. 2013-01-30 13:07:38 +01:00
Erich Hoover 331b99cf19 advapi32: Support service objects in GetSecurityInfo. 2012-12-14 12:25:57 +01:00
Piotr Caban 8ebf0a72c9 advapi32: Don't terminate service when its last thread has exited. 2012-10-22 15:17:51 +02:00
Piotr Caban a936b58b8b advapi32: Return from StartServiceCtrlDispatcher when service status is changed to stopped. 2012-10-22 15:17:44 +02:00
Piotr Caban 6027fe2daf advapi32: Validate arguments in StartServiceCtrlDispatcher. 2012-10-22 15:17:39 +02:00
Marcus Meissner aaabec2b33 advapi32: Avoid memory leak on pipe read failure (Coverity). 2012-10-03 18:16:48 +02:00
Andrew Eikum ac615a7e9a advapi32: Consolidate helper function. 2012-09-14 12:03:01 +02:00
Jacek Caban 52363aef65 advapi32: Pass service name as argv[0] to ServiceMain. 2012-06-15 18:35:42 +02:00
Alexander Morozov 6d6e6600ef advapi32: Regular program should not freeze forever if it calls StartServiceCtrlDispatcher. 2012-04-04 19:15:26 +02:00
Alistair Leslie-Hughes 77b9d58556 advapi32: Assign a default value (clang). 2012-03-16 13:02:51 +01:00
Piotr Caban e849691fcc advapi32: Send shutdown notification to services. 2011-11-30 16:34:05 +01:00
Piotr Caban e2172edca2 advapi32: Added support for SERVICE_CONFIG_PRESHUTDOWN_INFO. 2011-11-30 16:32:09 +01:00
Andrew Talbot 8a1539ac98 advapi32: Remove an unused variable. 2011-11-14 13:10:22 +01:00
Hans Leidekker dc46df47a4 advapi32: Make sure lpDisplayName is initialized in EnumServicesStatusA. 2011-06-10 10:56:48 +02:00
Alexandre Julliard ad4c995c3f advapi32: Always pass valid buffers in the EnumServicesStatus requests. 2011-06-09 23:42:41 +02:00
Alexandre Julliard 519fbf6202 advapi32: Fix the parameter checks in QueryServiceStatusEx. 2011-06-09 23:42:41 +02:00
Marcus Meissner 7810e231a8 advapi32: Mark some internal symbols as hidden. 2011-04-27 18:15:57 +02:00
André Hentschel c6682ef5dc advapi32: Print a FIXME also for the unknown levels. 2010-12-23 13:47:27 +01:00
Damian Dixon fd0bec1f96 advapi32: Added check for NULL pointer being passed to QueryServiceStatus for either parameter. 2010-12-21 16:56:00 +01:00
Hans Leidekker 7135ac7641 advapi32: Implement EnumServicesStatusExA/W. 2010-10-29 14:33:57 +02:00
Hans Leidekker ae7d41bfa2 advapi32: Implement EnumServicesStatusA/W. 2010-10-27 13:31:04 +02:00
Mikhail Maroukhine 0490131783 advapi32: Fix compiler warnings with flag -Wcast-qual. 2010-03-29 12:10:06 +02:00
Andrew Talbot c17cfbdc51 advapi32: Constify some variables. 2009-03-27 11:23:16 +01:00