Author: ekohl
Date: Sat Jan 14 15:17:29 2017
New Revision: 73547
URL:
http://svn.reactos.org/svn/reactos?rev=73547&view=rev
Log:
[ADVAPI32]
Implement I_ScPnPGetServiceName().
Modified:
trunk/reactos/dll/win32/advapi32/advapi32.spec
trunk/reactos/dll/win32/advapi32/service/sctrl.c
Modified: trunk/reactos/dll/win32/advapi32/advapi32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/advapi3…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/advapi32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/advapi32.spec [iso-8859-1] Sat Jan 14 15:17:29 2017
@@ -296,7 +296,7 @@
296 stdcall GetWindowsAccountDomainSid(ptr ptr ptr)
297 stub I_QueryTagInformation
298 stub I_ScIsSecurityProcess
-299 stub I_ScPnPGetServiceName
+299 stdcall I_ScPnPGetServiceName(ptr wstr long)
300 stub I_ScSendTSMessage
301 stdcall I_ScSetServiceBitsA(ptr long long long str)
302 stdcall I_ScSetServiceBitsW(ptr long long long wstr)
Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] Sat Jan 14 15:17:29
2017
@@ -182,6 +182,7 @@
return ERROR_SUCCESS;
}
+
static DWORD WINAPI
ScServiceMainStubW(LPVOID Context)
@@ -743,6 +744,34 @@
/**********************************************************************
+ * I_ScPnPGetServiceName
+ *
+ * Undocumented
+ *
+ * @implemented
+ */
+DWORD
+WINAPI
+I_ScPnPGetServiceName(IN SERVICE_STATUS_HANDLE hServiceStatus,
+ OUT LPWSTR lpServiceName,
+ IN DWORD cchServiceName)
+{
+ DWORD i;
+
+ for (i = 0; i < dwActiveServiceCount; i++)
+ {
+ if (lpActiveServices[i].hServiceStatus == hServiceStatus)
+ {
+ wcscpy(lpServiceName, lpActiveServices[i].ServiceName.Buffer);
+ return ERROR_SUCCESS;
+ }
+ }
+
+ return ERROR_SERVICE_NOT_IN_EXE;
+}
+
+
+/**********************************************************************
* I_ScSetServiceBitsA
*
* Undocumented