Author: tfaber
Date: Sat Apr 4 06:30:44 2015
New Revision: 67027
URL:
http://svn.reactos.org/svn/reactos?rev=67027&view=rev
Log:
[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
Modified:
trunk/reactos/base/system/services/rpcserver.c
trunk/reactos/dll/win32/advapi32/service/scm.c
trunk/reactos/include/reactos/idl/svcctl.idl
Modified: trunk/reactos/base/system/services/rpcserver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
==============================================================================
--- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Sat Apr 4 06:30:44 2015
@@ -1909,6 +1909,7 @@
goto done;
}
+ wcscpy(lpDisplayNameW, lpDisplayName);
if (lpService->lpDisplayName != lpService->lpServiceName)
HeapFree(GetProcessHeap(), 0, lpService->lpDisplayName);
@@ -4816,14 +4817,14 @@
if (InfoW.dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
{
LPSERVICE_DESCRIPTIONW lpServiceDescriptionW;
- //LPSERVICE_DESCRIPTIONA lpServiceDescriptionA;
-
- //lpServiceDescriptionA = Info.psd;
-
- ///if (lpServiceDescriptionA &&
- ///lpServiceDescriptionA->lpDescription)
- ///{
- dwLength = (DWORD)((strlen(Info.lpDescription) + 1) * sizeof(WCHAR));
+ LPSERVICE_DESCRIPTIONA lpServiceDescriptionA;
+
+ lpServiceDescriptionA = Info.psd;
+
+ if (lpServiceDescriptionA &&
+ lpServiceDescriptionA->lpDescription)
+ {
+ dwLength = (DWORD)((strlen(lpServiceDescriptionA->lpDescription) + 1) *
sizeof(WCHAR));
lpServiceDescriptionW = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
@@ -4837,14 +4838,14 @@
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)
{
Modified: trunk/reactos/dll/win32/advapi32/service/scm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/scm.c [iso-8859-1] Sat Apr 4 06:30:44 2015
@@ -167,17 +167,16 @@
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 @@
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:
Modified: trunk/reactos/include/reactos/idl/svcctl.idl
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/svcctl…
==============================================================================
--- trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/idl/svcctl.idl [iso-8859-1] Sat Apr 4 06:30:44 2015
@@ -192,7 +192,6 @@
[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 {