[SERVICES] Separate the start tag and the service tag of the manages services

This fixes two winetest errors.
This commit is contained in:
Eric Kohl 2024-01-21 22:42:26 +01:00
parent 835942fbf6
commit d3d67bf5bd
2 changed files with 5 additions and 4 deletions

View file

@ -4,7 +4,7 @@
* FILE: base/system/services/database.c * FILE: base/system/services/database.c
* PURPOSE: Database control interface * PURPOSE: Database control interface
* COPYRIGHT: Copyright 2002-2006 Eric Kohl * COPYRIGHT: Copyright 2002-2006 Eric Kohl
* Copyright 2006 Hervé Poussineau <hpoussin@reactos.org> * Copyright 2006 Hervé Poussineau <hpoussin@reactos.org>
* Copyright 2007 Ged Murphy <gedmurphy@reactos.org> * Copyright 2007 Ged Murphy <gedmurphy@reactos.org>
* Gregor Brunmar <gregor.brunmar@home.se> * Gregor Brunmar <gregor.brunmar@home.se>
* *
@ -201,7 +201,7 @@ ScmGetServiceNameFromTag(IN PTAG_INFO_NAME_FROM_TAG_IN_PARAMS InParams,
ServiceListEntry); ServiceListEntry);
/* We must match the tag */ /* We must match the tag */
if (CurrentService->dwTag == InParams->dwTag && if (CurrentService->dwServiceTag == InParams->dwTag &&
CurrentService->lpImage != NULL) CurrentService->lpImage != NULL)
{ {
CurrentImage = CurrentService->lpImage; CurrentImage = CurrentService->lpImage;
@ -757,7 +757,7 @@ ScmGenerateServiceTag(PSERVICE lpServiceRecord)
/* Increment the tag counter and set it */ /* Increment the tag counter and set it */
ServiceTag = ServiceTag % 0xFFFFFFFF + 1; ServiceTag = ServiceTag % 0xFFFFFFFF + 1;
lpServiceRecord->dwTag = ServiceTag; lpServiceRecord->dwServiceTag = ServiceTag;
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
@ -1536,7 +1536,7 @@ ScmSendStartCommand(PSERVICE Service,
? SERVICE_CONTROL_START_OWN ? SERVICE_CONTROL_START_OWN
: SERVICE_CONTROL_START_SHARE; : SERVICE_CONTROL_START_SHARE;
ControlPacket->hServiceStatus = (SERVICE_STATUS_HANDLE)Service; ControlPacket->hServiceStatus = (SERVICE_STATUS_HANDLE)Service;
ControlPacket->dwServiceTag = Service->dwTag; ControlPacket->dwServiceTag = Service->dwServiceTag;
/* Copy the start command line */ /* Copy the start command line */
ControlPacket->dwServiceNameOffset = sizeof(SCM_CONTROL_PACKET); ControlPacket->dwServiceNameOffset = sizeof(SCM_CONTROL_PACKET);

View file

@ -73,6 +73,7 @@ typedef struct _SERVICE
DWORD dwTag; DWORD dwTag;
DWORD dwServiceBits; DWORD dwServiceBits;
DWORD dwServiceTag;
ULONG Flags; ULONG Flags;