- Move SetServiceObjectSecurity to the right file.
- Pass arguments to ANSI services.
Modified: trunk/reactos/lib/advapi32/service/scm.c
Modified: trunk/reactos/lib/advapi32/service/sctrl.c
_____
Modified: trunk/reactos/lib/advapi32/service/scm.c
--- trunk/reactos/lib/advapi32/service/scm.c 2005-12-18 21:01:56 UTC
(rev 20258)
+++ trunk/reactos/lib/advapi32/service/scm.c 2005-12-18 21:38:05 UTC
(rev 20259)
@@ -1223,6 +1223,21 @@
/**********************************************************************
+ * SetServiceObjectSecurity
+ *
+ * @unimplemented
+ */
+BOOL STDCALL
+SetServiceObjectSecurity(SC_HANDLE hService,
+ SECURITY_INFORMATION dwSecurityInformation,
+ PSECURITY_DESCRIPTOR lpSecurityDescriptor)
+{
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+
+/**********************************************************************
* StartServiceA
*
* @unimplemented
_____
Modified: trunk/reactos/lib/advapi32/service/sctrl.c
--- trunk/reactos/lib/advapi32/service/sctrl.c 2005-12-18 21:01:56 UTC
(rev 20258)
+++ trunk/reactos/lib/advapi32/service/sctrl.c 2005-12-18 21:38:05 UTC
(rev 20259)
@@ -134,7 +134,54 @@
}
else
{
- (lpService->Main.lpFuncA)(0, NULL);
+ LPSTR *lpArgVector;
+ LPSTR Ptr;
+ LPSTR AnsiString;
+ DWORD AnsiLength;
+
+ AnsiLength = WideCharToMultiByte(CP_ACP,
+ 0,
+ lpService->Arguments,
+ dwLength,
+ NULL,
+ 0,
+ NULL,
+ NULL);
+ AnsiString = HeapAlloc(GetProcessHeap(),
+ 0,
+ AnsiLength);
+ WideCharToMultiByte(CP_ACP,
+ 0,
+ lpService->Arguments,
+ dwLength,
+ AnsiString,
+ AnsiLength,
+ NULL,
+ NULL);
+
+ lpArgVector = HeapAlloc(GetProcessHeap(),
+ 0,
+ (dwArgCount + 1) * sizeof(LPSTR));
+
+ dwArgCount = 0;
+ Ptr = AnsiString;
+ while (*Ptr)
+ {
+ lpArgVector[dwArgCount] = Ptr;
+
+ dwArgCount++;
+ Ptr += (strlen(Ptr) + 1);
+ }
+ lpArgVector[dwArgCount] = NULL;
+
+ (lpService->Main.lpFuncA)(dwArgCount, lpArgVector);
+
+ HeapFree(GetProcessHeap(),
+ 0,
+ lpArgVector);
+ HeapFree(GetProcessHeap(),
+ 0,
+ AnsiString);
}
return ERROR_SUCCESS;
@@ -255,7 +302,7 @@
NULL);
if (bResult == FALSE)
{
- DPRINT1("Pipe read failed\n");
+ DPRINT1("Pipe read failed (Error: %lu)\n", GetLastError());
return FALSE;
}
@@ -408,21 +455,6 @@
/**********************************************************************
- * SetServiceObjectSecurity
- *
- * @unimplemented
- */
-BOOL STDCALL
-SetServiceObjectSecurity(SC_HANDLE hService,
- SECURITY_INFORMATION dwSecurityInformation,
- PSECURITY_DESCRIPTOR lpSecurityDescriptor)
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/**********************************************************************
* SetServiceStatus
*
* @implemented
Show replies by date