Author: dchapyshev
Date: Mon Nov 3 06:27:39 2008
New Revision: 37167
URL:
http://svn.reactos.org/svn/reactos?rev=37167&view=rev
Log:
- Move IsWow64Process to proc.c
- Implement FatalAppExitW (based on Wine)
Modified:
trunk/reactos/dll/win32/kernel32/misc/stubs.c
trunk/reactos/dll/win32/kernel32/process/proc.c
Modified: trunk/reactos/dll/win32/kernel32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/st…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/stubs.c [iso-8859-1] Mon Nov 3 06:27:39 2008
@@ -529,35 +529,6 @@
{
STUB;
return 0;
-}
-
-/*
- * @implemented
- */
-BOOL
-STDCALL
-IsWow64Process(
- HANDLE hProcess,
- PBOOL Wow64Process
- )
-{
- ULONG pbi;
- NTSTATUS Status;
-
- Status = NtQueryInformationProcess(hProcess,
- ProcessWow64Information,
- &pbi,
- sizeof(pbi),
- NULL);
-
- if (Status != STATUS_SUCCESS)
- {
- SetLastError(RtlNtStatusToDosError(Status));
- return FALSE;
- }
-
- *Wow64Process = (pbi != 0);
- return TRUE;
}
/*
Modified: trunk/reactos/dll/win32/kernel32/process/proc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/process/proc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/process/proc.c [iso-8859-1] Mon Nov 3 06:27:39 2008
@@ -16,6 +16,8 @@
#define NDEBUG
#include <debug.h>
+
+typedef INT (WINAPI *MessageBoxW_Proc) (HWND, LPCWSTR, LPCWSTR, UINT);
/* GLOBALS *******************************************************************/
@@ -617,8 +619,8 @@
* @unimplemented
*/
VOID STDCALL
-FatalAppExitA (UINT uAction,
- LPCSTR lpMessageText)
+FatalAppExitA(UINT uAction,
+ LPCSTR lpMessageText)
{
UNICODE_STRING MessageTextU;
ANSI_STRING MessageText;
@@ -640,9 +642,24 @@
*/
VOID STDCALL
FatalAppExitW(UINT uAction,
- LPCWSTR lpMessageText)
-{
- return;
+ LPCWSTR lpMessageText)
+{
+ static const WCHAR szUser32[] = L"user32.dll\0";
+
+ HMODULE hModule = GetModuleHandleW(szUser32);
+ MessageBoxW_Proc pMessageBoxW = NULL;
+
+ DPRINT1("AppExit\n");
+
+ if (hModule)
+ pMessageBoxW = (MessageBoxW_Proc) GetProcAddress(hModule,
"MessageBoxW");
+
+ if (pMessageBoxW)
+ pMessageBoxW(0, lpMessageText, NULL, MB_SYSTEMMODAL | MB_OK);
+ else
+ DPRINT1("%s\n", lpMessageText);
+
+ ExitProcess(0);
}
@@ -895,4 +912,34 @@
return FALSE;
}
+
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+IsWow64Process(
+ HANDLE hProcess,
+ PBOOL Wow64Process
+ )
+{
+ ULONG pbi;
+ NTSTATUS Status;
+
+ Status = NtQueryInformationProcess(hProcess,
+ ProcessWow64Information,
+ &pbi,
+ sizeof(pbi),
+ NULL);
+
+ if (!NT_SUCCESS(Status))
+ {
+ SetLastError(RtlNtStatusToDosError(Status));
+ return FALSE;
+ }
+
+ *Wow64Process = (pbi != 0);
+ return TRUE;
+}
+
/* EOF */