[PATCH v2] kernel32: add stub for GetApplicationRestartSettings

Louis Lenders xerox.xerox2000x at gmail.com
Mon Aug 27 11:26:29 CDT 2018


v2: Removed SetLastError and return E_NOTIMPL

Found this trying to start newest firefox 61.0.2. This prevents crashing
it.

(note: also removed a superfluous extra empty line few lines above this
change) 

To: wine-devel <wine-devel at winehq.org>

Signed-off-by: Louis Lenders <xerox.xerox2000x at gmail.com>
---
 dlls/kernel32/kernel32.spec |  2 +-
 dlls/kernel32/process.c     | 10 +++++++++-
 include/winbase.h           |  1 +
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec
index c53276c70a..f1d75b8e1c 100644
--- a/dlls/kernel32/kernel32.spec
+++ b/dlls/kernel32/kernel32.spec
@@ -543,7 +543,7 @@
 @ stdcall GetActiveProcessorCount(long)
 @ stdcall GetActiveProcessorGroupCount()
 # @ stub GetApplicationRecoveryCallback
-# @ stub GetApplicationRestartSettings
+@ stdcall GetApplicationRestartSettings(long ptr ptr ptr)
 @ stdcall GetAtomNameA(long ptr long)
 @ stdcall GetAtomNameW(long ptr long)
 @ stdcall GetBinaryType(str ptr) GetBinaryTypeA
diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index d615f06c4a..ad61d18dbe 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -3953,7 +3953,6 @@ BOOL WINAPI CmdBatNotification( BOOL bBatchRunning )
     return FALSE;
 }
 
-
 /***********************************************************************
  *           RegisterApplicationRestart       (KERNEL32.@)
  */
@@ -4023,6 +4022,15 @@ HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK
     return E_FAIL;
 }
 
+/***********************************************************************
+ *           GetApplicationRestartSettings       (KERNEL32.@)
+ */
+HRESULT WINAPI GetApplicationRestartSettings(HANDLE process, WCHAR *cmdline, DWORD *size, DWORD *flags)
+{
+    FIXME("%p, %p, %p, %p)\n", process, cmdline, size, flags);
+    return E_NOTIMPL;
+}
+
 /**********************************************************************
  *           GetNumaHighestNodeNumber     (KERNEL32.@)
  */
diff --git a/include/winbase.h b/include/winbase.h
index aa57dae818..8b26308b95 100644
--- a/include/winbase.h
+++ b/include/winbase.h
@@ -2038,6 +2038,7 @@ WINBASEAPI BOOL        WINAPI FreeResource(HGLOBAL);
 WINADVAPI  PVOID       WINAPI FreeSid(PSID);
 WINADVAPI  BOOL        WINAPI GetAce(PACL,DWORD,LPVOID*);
 WINADVAPI  BOOL        WINAPI GetAclInformation(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS);
+WINBASEAPI HRESULT     WINAPI GetApplicationRestartSettings(HANDLE,WCHAR*,DWORD*,DWORD*);
 WINBASEAPI UINT        WINAPI GetAtomNameA(ATOM,LPSTR,INT);
 WINBASEAPI UINT        WINAPI GetAtomNameW(ATOM,LPWSTR,INT);
 #define                       GetAtomName WINELIB_NAME_AW(GetAtomName)
-- 
2.17.1




More information about the wine-devel mailing list