dlls/rstrtmgr: add stubs for RmGetList and RmRegisterResources
Austin English
austinenglish at gmail.com
Thu Sep 9 00:41:01 CDT 2010
This gets the Corel Paint Shop Pro X3 installer a bit further.
dlls/rstrtmgr/main.c | 30 +++++++++++++++++++++-
dlls/rstrtmgr/rstrtmgr.spec | 4 +-
include/restartmanager.h | 58 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 89 insertions(+), 3 deletions(-)
create mode 100644 include/restartmanager.h
--
-Austin
-------------- next part --------------
diff --git a/dlls/rstrtmgr/main.c b/dlls/rstrtmgr/main.c
index f39ca83..2398a78 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 stub!\n", dwSessionHandle, 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..50da175 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)
@ stub RmJoinSession
-@ stub RmRegisterResources
+@ stdcall RmRegisterResources(long long ptr long ptr long ptr)
@ stub RmRemoveFilter
@ stub RmReserveHeap
@ stub RmRestart
diff --git a/include/restartmanager.h b/include/restartmanager.h
new file mode 100644
index 0000000..a00520a
--- /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 */
--
1.7.0.4
More information about the wine-patches
mailing list