Austin English : rstrtmgr: Add stubs for RmGetList and RmRegisterResources.
Alexandre Julliard
julliard at winehq.org
Thu Sep 9 13:56:52 CDT 2010
Module: wine
Branch: master
Commit: e899b55ec167a32cbbc90f3fe8db3db66338ceac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e899b55ec167a32cbbc90f3fe8db3db66338ceac
Author: Austin English <austinenglish at gmail.com>
Date: Thu Sep 9 11:19:41 2010 -0500
rstrtmgr: Add stubs for RmGetList and RmRegisterResources.
---
dlls/rstrtmgr/main.c | 30 +++++++++++++++++++++-
dlls/rstrtmgr/rstrtmgr.spec | 4 +-
include/Makefile.in | 1 +
include/restartmanager.h | 58 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 90 insertions(+), 3 deletions(-)
diff --git a/dlls/rstrtmgr/main.c b/dlls/rstrtmgr/main.c
index f39ca83..8ac62ae 100644
--- a/dlls/rstrtmgr/main.c
+++ b/dlls/rstrtmgr/main.c
@@ -23,6 +23,8 @@
#include "winbase.h"
#include "wine/debug.h"
+#include "restartmanager.h"
+
WINE_DEFAULT_DEBUG_CHANNEL(rstrtmgr);
/*****************************************************
@@ -48,9 +50,35 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
}
/***********************************************************************
+ * RmGetList (rstrtmgr.@)
+ *
+ * Retrieve the list of all applications and services using resources registered with the Restart Manager session
+ */
+DWORD WINAPI RmGetList(DWORD dwSessionHandle, UINT *pnProcInfoNeeded, UINT *pnProcInfo,
+ RM_PROCESS_INFO *rgAffectedApps[], LPDWORD lpdwRebootReasons)
+{
+ FIXME("%d, %p, %p, %p, %p stub!\n", dwSessionHandle, pnProcInfoNeeded, pnProcInfo, rgAffectedApps, lpdwRebootReasons);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/***********************************************************************
+ * RmRegisterResources (rstrtmgr.@)
+ *
+ * Register resources for a Restart Manager session
+ */
+DWORD WINAPI RmRegisterResources(DWORD dwSessionHandle, UINT nFiles, LPCWSTR rgsFilenames[],
+ UINT nApplications, RM_UNIQUE_PROCESS *rgApplications,
+ UINT nServices, LPCWSTR rgsServiceNames[])
+{
+ FIXME("%d, %d, %p, %d, %p, %d, %p stub!\n", dwSessionHandle, nFiles, rgsFilenames,
+ nApplications, rgApplications, nServices, rgsServiceNames);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/***********************************************************************
* RmStartSession (rstrtmgr.@)
*
- * Start a new restart manager session
+ * Start a new Restart Manager session
*/
DWORD WINAPI RmStartSession(DWORD *sessionhandle, DWORD flags, WCHAR sessionkey[])
{
diff --git a/dlls/rstrtmgr/rstrtmgr.spec b/dlls/rstrtmgr/rstrtmgr.spec
index f9466a8..c943658 100644
--- a/dlls/rstrtmgr/rstrtmgr.spec
+++ b/dlls/rstrtmgr/rstrtmgr.spec
@@ -2,9 +2,9 @@
@ stub RmCancelCurrentTask
@ stub RmEndSession
@ stub RmGetFilterList
-@ stub RmGetList
+@ stdcall RmGetList(long ptr ptr ptr ptr)
@ stub RmJoinSession
-@ stub RmRegisterResources
+@ stdcall RmRegisterResources(long long ptr long ptr long ptr)
@ stub RmRemoveFilter
@ stub RmReserveHeap
@ stub RmRestart
diff --git a/include/Makefile.in b/include/Makefile.in
index 2812eff..8fd6663 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -425,6 +425,7 @@ SRCDIR_INCLUDES = \
raserror.h \
reason.h \
regstr.h \
+ restartmanager.h \
richedit.h \
rmxfguid.h \
row.idl \
diff --git a/include/restartmanager.h b/include/restartmanager.h
new file mode 100644
index 0000000..c2250bb
--- /dev/null
+++ b/include/restartmanager.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Austin English
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef RESTARTMANAGER_H
+#define RESTARTMANAGER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CCH_RM_MAX_APP_NAME 255
+#define CH_RM_MAX_SVC_NAME 63
+
+typedef enum {
+ RmUnknownApp = 0,
+ RmMainWindow = 1,
+ RmOtherWindow = 2,
+ RmService = 3,
+ RmExplorer = 4,
+ RmConsole = 5,
+ RmCritical = 1000
+} RM_APP_TYPE;
+
+typedef struct {
+ DWORD dwProcessId;
+ FILETIME ProcessStartTime;
+} RM_UNIQUE_PROCESS, *PRM_UNIQUE_PROCESS;
+
+typedef struct {
+ RM_UNIQUE_PROCESS Process;
+ WCHAR strAppName[CCH_RM_MAX_APP_NAME+1];
+ WCHAR strServiceShortName[CH_RM_MAX_SVC_NAME+1];
+ RM_APP_TYPE ApplicationType;
+ ULONG AppStatus;
+ DWORD TSSessionID;
+ BOOL bRestartable;
+} RM_PROCESS_INFO, *PRM_PROCESS_INFO;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* RESTARTMANAGER_H */
More information about the wine-cvs
mailing list