mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[SERVICES][ADVAPI32]
- Remove old hack member in SC_RPC_CONFIG_INFOA that is no longer necessary and makes info levels other than SERVICE_CONFIG_DESCRIPTION fail. Fixes failure in VMware Tools installer. - Actually save the new service description in RChangeServiceConfigW CORE-9479 #resolve svn path=/trunk/; revision=67027
This commit is contained in:
parent
9b70cba818
commit
bd82c844a9
3 changed files with 15 additions and 16 deletions
|
@ -1909,6 +1909,7 @@ DWORD RChangeServiceConfigW(
|
|||
goto done;
|
||||
}
|
||||
|
||||
wcscpy(lpDisplayNameW, lpDisplayName);
|
||||
if (lpService->lpDisplayName != lpService->lpServiceName)
|
||||
HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName);
|
||||
|
||||
|
@ -4816,14 +4817,14 @@ DWORD RChangeServiceConfig2A(
|
|||
if (InfoW.dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
|
||||
{
|
||||
LPSERVICE_DESCRIPTIONW lpServiceDescriptionW;
|
||||
//LPSERVICE_DESCRIPTIONA lpServiceDescriptionA;
|
||||
LPSERVICE_DESCRIPTIONA lpServiceDescriptionA;
|
||||
|
||||
//lpServiceDescriptionA = Info.psd;
|
||||
lpServiceDescriptionA = Info.psd;
|
||||
|
||||
///if (lpServiceDescriptionA &&
|
||||
///lpServiceDescriptionA->lpDescription)
|
||||
///{
|
||||
dwLength = (DWORD)((strlen(Info.lpDescription) + 1) * sizeof(WCHAR));
|
||||
if (lpServiceDescriptionA &&
|
||||
lpServiceDescriptionA->lpDescription)
|
||||
{
|
||||
dwLength = (DWORD)((strlen(lpServiceDescriptionA->lpDescription) + 1) * sizeof(WCHAR));
|
||||
|
||||
lpServiceDescriptionW = HeapAlloc(GetProcessHeap(),
|
||||
HEAP_ZERO_MEMORY,
|
||||
|
@ -4837,14 +4838,14 @@ DWORD RChangeServiceConfig2A(
|
|||
|
||||
MultiByteToWideChar(CP_ACP,
|
||||
0,
|
||||
Info.lpDescription,
|
||||
lpServiceDescriptionA->lpDescription,
|
||||
-1,
|
||||
lpServiceDescriptionW->lpDescription,
|
||||
dwLength);
|
||||
|
||||
ptr = lpServiceDescriptionW;
|
||||
InfoW.psd = lpServiceDescriptionW;
|
||||
///}
|
||||
}
|
||||
}
|
||||
else if (Info.dwInfoLevel == SERVICE_CONFIG_FAILURE_ACTIONS)
|
||||
{
|
||||
|
|
|
@ -167,17 +167,16 @@ ChangeServiceConfig2A(SC_HANDLE hService,
|
|||
|
||||
if (lpInfo == NULL) return TRUE;
|
||||
|
||||
/* Fill relevent field of the Info structure */
|
||||
/* Fill relevant field of the Info structure */
|
||||
Info.dwInfoLevel = dwInfoLevel;
|
||||
switch (dwInfoLevel)
|
||||
{
|
||||
case SERVICE_CONFIG_DESCRIPTION:
|
||||
Info.psd = (LPSERVICE_DESCRIPTIONA)&lpInfo;
|
||||
Info.lpDescription = ((LPSERVICE_DESCRIPTIONA)lpInfo)->lpDescription; //HACK
|
||||
Info.psd = lpInfo;
|
||||
break;
|
||||
|
||||
case SERVICE_CONFIG_FAILURE_ACTIONS:
|
||||
Info.psfa = (LPSERVICE_FAILURE_ACTIONSA)lpInfo;
|
||||
Info.psfa = lpInfo;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -225,16 +224,16 @@ ChangeServiceConfig2W(SC_HANDLE hService,
|
|||
|
||||
if (lpInfo == NULL) return TRUE;
|
||||
|
||||
/* Fill relevent field of the Info structure */
|
||||
/* Fill relevant field of the Info structure */
|
||||
Info.dwInfoLevel = dwInfoLevel;
|
||||
switch (dwInfoLevel)
|
||||
{
|
||||
case SERVICE_CONFIG_DESCRIPTION:
|
||||
Info.psd = (LPSERVICE_DESCRIPTIONW)lpInfo;
|
||||
Info.psd = lpInfo;
|
||||
break;
|
||||
|
||||
case SERVICE_CONFIG_FAILURE_ACTIONS:
|
||||
Info.psfa = (LPSERVICE_FAILURE_ACTIONSW)lpInfo;
|
||||
Info.psfa = lpInfo;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -192,7 +192,6 @@ typedef struct _SC_RPC_CONFIG_INFOA {
|
|||
[case(6)] LPSERVICE_RPC_REQUIRED_PRIVILEGES_INFO psrp;
|
||||
[case(7)] LPSERVICE_PRESHUTDOWN_INFO psps;
|
||||
} DUMMYUNIONNAME;
|
||||
[string] LPSTR lpDescription; //FIXME
|
||||
} SC_RPC_CONFIG_INFOA, *LPSC_RPC_CONFIG_INFOA;
|
||||
|
||||
typedef struct _SC_RPC_CONFIG_INFOW {
|
||||
|
|
Loading…
Reference in a new issue