Author: tfaber
Date: Fri Mar 27 14:29:43 2015
New Revision: 66916
URL:
http://svn.reactos.org/svn/reactos?rev=66916&view=rev
Log:
[PSDK]
- Add NotifyServiceStatusChange definitions
Modified:
trunk/reactos/include/psdk/winsvc.h
Modified: trunk/reactos/include/psdk/winsvc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winsvc.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/winsvc.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winsvc.h [iso-8859-1] Fri Mar 27 14:29:43 2015
@@ -72,6 +72,21 @@
#define SERVICE_CONFIG_TRIGGER_INFO 8
#define SERVICE_CONFIG_PREFERRED_NODE 9
#define SERVICE_CONFIG_RUNLEVEL_INFO 10
+
+#define SERVICE_NOTIFY_STATUS_CHANGE_1 1
+#define SERVICE_NOTIFY_STATUS_CHANGE_2 2
+#define SERVICE_NOTIFY_STATUS_CHANGE SERVICE_NOTIFY_STATUS_CHANGE_2
+
+#define SERVICE_NOTIFY_STOPPED 1
+#define SERVICE_NOTIFY_START_PENDING 2
+#define SERVICE_NOTIFY_STOP_PENDING 4
+#define SERVICE_NOTIFY_RUNNING 8
+#define SERVICE_NOTIFY_CONTINUE_PENDING 16
+#define SERVICE_NOTIFY_PAUSE_PENDING 32
+#define SERVICE_NOTIFY_PAUSED 64
+#define SERVICE_NOTIFY_CREATED 128
+#define SERVICE_NOTIFY_DELETED 256
+#define SERVICE_NOTIFY_DELETE_PENDING 512
#ifndef _SERVICE_PRESHUTDOWN_INFO_DEFINED_
#define _SERVICE_PRESHUTDOWN_INFO_DEFINED_
@@ -213,6 +228,35 @@
LPWSTR pmszRequiredPrivileges;
} SERVICE_REQUIRED_PRIVILEGES_INFOW, *LPSERVICE_REQUIRED_PRIVILEGES_INFOW;
+typedef VOID (CALLBACK *PFN_SC_NOTIFY_CALLBACK)(_In_ PVOID);
+typedef struct _SERVICE_NOTIFY_1 {
+ DWORD dwVersion;
+ PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
+ PVOID pContext;
+ DWORD dwNotificationStatus;
+ SERVICE_STATUS_PROCESS ServiceStatus;
+} SERVICE_NOTIFY_1, *PSERVICE_NOTIFY_1;
+typedef struct _SERVICE_NOTIFY_2A {
+ DWORD dwVersion;
+ PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
+ PVOID pContext;
+ DWORD dwNotificationStatus;
+ SERVICE_STATUS_PROCESS ServiceStatus;
+ DWORD dwNotificationTriggered;
+ LPSTR pszServiceNames;
+} SERVICE_NOTIFY_2A, *PSERVICE_NOTIFY_2A;
+typedef struct _SERVICE_NOTIFY_2W {
+ DWORD dwVersion;
+ PFN_SC_NOTIFY_CALLBACK pfnNotifyCallback;
+ PVOID pContext;
+ DWORD dwNotificationStatus;
+ SERVICE_STATUS_PROCESS ServiceStatus;
+ DWORD dwNotificationTriggered;
+ LPWSTR pszServiceNames;
+} SERVICE_NOTIFY_2W, *PSERVICE_NOTIFY_2W;
+typedef SERVICE_NOTIFY_2A SERVICE_NOTIFYA, *PSERVICE_NOTIFYA;
+typedef SERVICE_NOTIFY_2W SERVICE_NOTIFYW, *PSERVICE_NOTIFYW;
+
BOOL WINAPI ChangeServiceConfigA(_In_ SC_HANDLE, _In_ DWORD, _In_ DWORD, _In_ DWORD,
_In_opt_ LPCSTR, _In_opt_ LPCSTR, _Out_opt_ LPDWORD, _In_opt_ LPCSTR, _In_opt_ LPCSTR,
_In_opt_ LPCSTR, _In_opt_ LPCSTR);
BOOL WINAPI ChangeServiceConfigW(_In_ SC_HANDLE, _In_ DWORD, _In_ DWORD, _In_ DWORD,
_In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _Out_opt_ LPDWORD, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR,
_In_opt_ LPCWSTR, _In_opt_ LPCWSTR);
BOOL WINAPI ChangeServiceConfig2A(_In_ SC_HANDLE, _In_ DWORD, _In_opt_ LPVOID);
@@ -343,6 +387,11 @@
_Must_inspect_result_ SC_HANDLE WINAPI OpenSCManagerW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR,
_In_ DWORD);
_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceA(_In_ SC_HANDLE, _In_ LPCSTR, _In_
DWORD);
_Must_inspect_result_ SC_HANDLE WINAPI OpenServiceW(_In_ SC_HANDLE, _In_ LPCWSTR, _In_
DWORD);
+
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+DWORD WINAPI NotifyServiceStatusChangeA(_In_ SC_HANDLE, _In_ DWORD, _In_
PSERVICE_NOTIFYA);
+DWORD WINAPI NotifyServiceStatusChangeW(_In_ SC_HANDLE, _In_ DWORD, _In_
PSERVICE_NOTIFYW);
+#endif
_Must_inspect_result_
BOOL
@@ -467,6 +516,10 @@
typedef LPSERVICE_FAILURE_ACTIONSW LPSERVICE_FAILURE_ACTIONS;
typedef SERVICE_REQUIRED_PRIVILEGES_INFOW SERVICE_REQUIRED_PRIVILEGES_INFO;
typedef LPSERVICE_REQUIRED_PRIVILEGES_INFOW LPSERVICE_REQUIRED_PRIVILEGES_INFO;
+typedef SERVICE_NOTIFY_2W SERVICE_NOTIFY_2;
+typedef PSERVICE_NOTIFY_2W PSERVICE_NOTIFY_2;
+typedef SERVICE_NOTIFYW SERVICE_NOTIFY;
+typedef PSERVICE_NOTIFYW PSERVICE_NOTIFY;
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEW
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEW
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERW
@@ -478,6 +531,9 @@
#define EnumServicesStatusEx EnumServicesStatusExW
#define GetServiceDisplayName GetServiceDisplayNameW
#define GetServiceKeyName GetServiceKeyNameW
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+#define NotifyServiceStatusChange NotifyServiceStatusChangeW
+#endif
#define OpenSCManager OpenSCManagerW
#define OpenService OpenServiceW
#define QueryServiceConfig QueryServiceConfigW
@@ -501,6 +557,10 @@
typedef LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS;
typedef SERVICE_REQUIRED_PRIVILEGES_INFOA SERVICE_REQUIRED_PRIVILEGES_INFO;
typedef LPSERVICE_REQUIRED_PRIVILEGES_INFOA LPSERVICE_REQUIRED_PRIVILEGES_INFO;
+typedef SERVICE_NOTIFY_2A SERVICE_NOTIFY_2;
+typedef PSERVICE_NOTIFY_2A PSERVICE_NOTIFY_2;
+typedef SERVICE_NOTIFYA SERVICE_NOTIFY;
+typedef PSERVICE_NOTIFYA PSERVICE_NOTIFY;
#define SERVICES_ACTIVE_DATABASE SERVICES_ACTIVE_DATABASEA
#define SERVICES_FAILED_DATABASE SERVICES_FAILED_DATABASEA
#define SC_GROUP_IDENTIFIER SC_GROUP_IDENTIFIERA
@@ -514,6 +574,9 @@
#define GetServiceKeyName GetServiceKeyNameA
#define OpenSCManager OpenSCManagerA
#define OpenService OpenServiceA
+#if (NTDDI_VERSION >= NTDDI_VISTA)
+#define NotifyServiceStatusChange NotifyServiceStatusChangeA
+#endif
#define QueryServiceConfig QueryServiceConfigA
#define QueryServiceConfig2 QueryServiceConfig2A
#define QueryServiceLockStatus QueryServiceLockStatusA