Author: cwittich
Date: Mon Mar 15 12:45:17 2010
New Revision: 46203
URL:
http://svn.reactos.org/svn/reactos?rev=46203&view=rev
Log:
[FAULTREP]
import faultrep.dll from wine 1.1.40
Added:
trunk/reactos/dll/win32/faultrep/ (with props)
trunk/reactos/dll/win32/faultrep/faultrep.c (with props)
trunk/reactos/dll/win32/faultrep/faultrep.rbuild (with props)
trunk/reactos/dll/win32/faultrep/faultrep.spec (with props)
Modified:
trunk/reactos/baseaddress.rbuild
trunk/reactos/boot/bootdata/packages/reactos.dff
trunk/reactos/dll/win32/win32.rbuild
Modified: trunk/reactos/baseaddress.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.rbuild?rev=462…
==============================================================================
--- trunk/reactos/baseaddress.rbuild [iso-8859-1] (original)
+++ trunk/reactos/baseaddress.rbuild [iso-8859-1] Mon Mar 15 12:45:17 2010
@@ -3,6 +3,7 @@
<group
xmlns:xi="http://www.w3.org/2001/XInclude">
<property name="BASEADDRESS_REGTESTS" value="0x07000000" />
<property name="BASEADDRESS_NOTIFYHOOK" value="0x08000000"
/>
+ <property name="BASEADDRESS_FAULTREP" value="0x107A0000" />
<property name="BASEADDRESS_QMGRPRXY" value="0x1f710000" />
<property name="BASEADDRESS_CRYPTDLG" value="0x209c0000" />
<property name="BASEADDRESS_COMCAT" value="0x20a50000" />
Modified: trunk/reactos/boot/bootdata/packages/reactos.dff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
==============================================================================
--- trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/packages/reactos.dff [iso-8859-1] Mon Mar 15 12:45:17
2010
@@ -286,6 +286,7 @@
dll\win32\devmgr\devmgr.dll 1
dll\win32\dhcpcsvc\dhcpcsvc.dll 1
dll\win32\dnsapi\dnsapi.dll 1
+dll\win32\faultrep\faultrep.dll 1
dll\win32\fmifs\fmifs.dll 1
dll\win32\fusion\fusion.dll 1
dll\win32\gdi32\gdi32.dll 1
Propchange: trunk/reactos/dll/win32/faultrep/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Mon Mar 15 12:45:17 2010
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/reactos/dll/win32/faultrep/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/reactos/dll/win32/faultrep/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/reactos/dll/win32/faultrep/
------------------------------------------------------------------------------
tsvn:logminsize = 10
Added: trunk/reactos/dll/win32/faultrep/faultrep.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/faultrep/faultre…
==============================================================================
--- trunk/reactos/dll/win32/faultrep/faultrep.c (added)
+++ trunk/reactos/dll/win32/faultrep/faultrep.c [iso-8859-1] Mon Mar 15 12:45:17 2010
@@ -1,0 +1,130 @@
+/* Fault report handling
+ *
+ * Copyright 2007 Peter Dons Tychsen
+ *
+ * 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
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winnls.h"
+#include "winreg.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+#include "errorrep.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(faultrep);
+
+static const WCHAR SZ_EXCLUSIONLIST_KEY[] = {
+
'S','o','f','t','w','a','r','e','\\',
+
'M','i','c','r','o','s','o','f','t','\\',
+
'P','C','H','e','a','l','t','h','\\',
+
'E','r','r','o','r','R','e','p','o','r','t','i','n','g','\\',
+
'E','x','c','l','u','s','i','o','n','L','i','s','t',
0};
+
+/*************************************************************************
+ * AddERExcludedApplicationW [FAULTREP.@]
+ *
+ * Adds an application to a list of applications for which fault reports
+ * shouldn't be generated
+ *
+ * PARAMS
+ * lpAppFileName [I] The filename of the application executable
+ *
+ * RETURNS
+ * TRUE on success, FALSE of failure
+ *
+ * NOTES
+ * Wine doesn't use this data but stores it in the registry (in the same place
+ * as Windows would) in case it will be useful in a future version
+ *
+ * According to MSDN this function should succeed even if the user has no write
+ * access to HKLM. This probably means that there is no error checking.
+ */
+BOOL WINAPI AddERExcludedApplicationW(LPCWSTR lpAppFileName)
+{
+ WCHAR *bslash;
+ DWORD value = 1;
+ HKEY hkey;
+
+ TRACE("(%s)\n", wine_dbgstr_w(lpAppFileName));
+ bslash = strrchrW(lpAppFileName, '\\');
+ if (bslash != NULL)
+ lpAppFileName = bslash + 1;
+ if (*lpAppFileName == '\0')
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if (!RegCreateKeyW(HKEY_LOCAL_MACHINE, SZ_EXCLUSIONLIST_KEY, &hkey))
+ {
+ RegSetValueExW(hkey, lpAppFileName, 0, REG_DWORD, (LPBYTE)&value,
sizeof(value));
+ RegCloseKey(hkey);
+ }
+
+ return TRUE;
+}
+
+/*************************************************************************
+ * AddERExcludedApplicationA [FAULTREP.@]
+ *
+ * See AddERExcludedApplicationW
+ */
+BOOL WINAPI AddERExcludedApplicationA(LPCSTR lpAppFileName)
+{
+ int len = MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, NULL, 0);
+ WCHAR *wstr;
+ BOOL ret;
+
+ TRACE("(%s)\n", wine_dbgstr_a(lpAppFileName));
+ if (len == 0)
+ return FALSE;
+ wstr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
+ MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, wstr, len);
+ ret = AddERExcludedApplicationW(wstr);
+ HeapFree(GetProcessHeap(), 0, wstr);
+ return ret;
+}
+
+/*************************************************************************
+ * ReportFault [FAULTREP.@]
+ */
+EFaultRepRetVal WINAPI ReportFault(LPEXCEPTION_POINTERS pep, DWORD dwOpt)
+{
+ FIXME("%p 0x%x stub\n", pep, dwOpt);
+ return frrvOk;
+}
+
+/***********************************************************************
+ * DllMain.
+ */
+BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
+{
+ switch(reason)
+ {
+ case DLL_WINE_PREATTACH:
+ return FALSE;
+ case DLL_PROCESS_ATTACH:
+ DisableThreadLibraryCalls(inst);
+ break;
+ case DLL_PROCESS_DETACH:
+ break;
+ }
+ return TRUE;
+}
Propchange: trunk/reactos/dll/win32/faultrep/faultrep.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/faultrep/faultrep.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/faultrep/faultre…
==============================================================================
--- trunk/reactos/dll/win32/faultrep/faultrep.rbuild (added)
+++ trunk/reactos/dll/win32/faultrep/faultrep.rbuild [iso-8859-1] Mon Mar 15 12:45:17
2010
@@ -1,0 +1,9 @@
+<module name="faultrep" type="win32dll"
baseaddress="${BASEADDRESS_FAULTREP}" installbase="system32"
installname="faultrep.dll">
+ <importlibrary definition="faultrep.spec" />
+ <include base="fusion">.</include>
+ <include base="ReactOS">include/reactos/wine</include>
+ <define name="__WINESRC__" />
+ <library>wine</library>
+ <library>advapi32</library>
+ <file>faultrep.c</file>
+</module>
Propchange: trunk/reactos/dll/win32/faultrep/faultrep.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/faultrep/faultrep.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/faultrep/faultre…
==============================================================================
--- trunk/reactos/dll/win32/faultrep/faultrep.spec (added)
+++ trunk/reactos/dll/win32/faultrep/faultrep.spec [iso-8859-1] Mon Mar 15 12:45:17 2010
@@ -1,0 +1,14 @@
+@ stdcall AddERExcludedApplicationA(str)
+@ stdcall AddERExcludedApplicationW(wstr)
+@ stub CreateMinidumpA
+@ stub CreateMinidumpW
+@ stub ReportEREvent
+@ stub ReportEREventDW
+@ stdcall ReportFault(ptr long)
+@ stub ReportFaultDWM
+@ stub ReportFaultFromQueue
+@ stub ReportFaultToQueue
+@ stub ReportHang
+@ stub ReportKernelFaultA
+@ stub ReportKernelFaultDWW
+@ stub ReportKernelFaultW
Propchange: trunk/reactos/dll/win32/faultrep/faultrep.spec
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/win32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/win32.rbuild?rev…
==============================================================================
--- trunk/reactos/dll/win32/win32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/win32.rbuild [iso-8859-1] Mon Mar 15 12:45:17 2010
@@ -103,6 +103,9 @@
<directory name="dnsapi">
<xi:include href="dnsapi/dnsapi.rbuild" />
</directory>
+<directory name="faultrep">
+ <xi:include href="faultrep/faultrep.rbuild" />
+</directory>
<directory name="fmifs">
<xi:include href="fmifs/fmifs.rbuild" />
</directory>