[PATCH 2/3] wer: Add stubs for WerReportCreate + WerReportCloseHandle

Detlef Riekenberg wine.dev at web.de
Thu Oct 28 16:42:16 CDT 2010


---
 dlls/wer/Makefile.in |    3 +-
 dlls/wer/report.c    |   77 ++++++++++++++++++++++++++++++++++++++++++++++++++
 dlls/wer/wer.spec    |    4 +-
 3 files changed, 81 insertions(+), 3 deletions(-)
 create mode 100644 dlls/wer/report.c

diff --git a/dlls/wer/Makefile.in b/dlls/wer/Makefile.in
index e90dcc0..fc15b27 100644
--- a/dlls/wer/Makefile.in
+++ b/dlls/wer/Makefile.in
@@ -2,6 +2,7 @@ MODULE    = wer.dll
 IMPORTLIB = wer
 
 C_SRCS = \
-	main.c
+	main.c \
+	report.c
 
 @MAKE_DLL_RULES@
diff --git a/dlls/wer/report.c b/dlls/wer/report.c
new file mode 100644
index 0000000..6bd9998
--- /dev/null
+++ b/dlls/wer/report.c
@@ -0,0 +1,77 @@
+/*
+ * Windows Error Reporting: Report management
+ * 
+ * Copyright 2010 Detlef Riekenberg
+ *
+ * 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 "config.h"
+
+#include <stdarg.h>
+#include "windef.h"
+#include "winbase.h"
+#include "werapi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wer);
+
+/***********************************************************************
+ * WerReportCloseHandle (wer.@)
+ *
+ */
+HRESULT WINAPI WerReportCloseHandle(HREPORT hreport)
+{
+    FIXME("(%p) :stub\n", hreport);
+
+    return E_NOTIMPL;
+}
+
+/***********************************************************************
+ * WerReportCreate (wer.@)
+ *
+ * Create an error report in memory and return a related HANDLE
+ *
+ * PARAMS
+ *  eventtype  [i] a name for the event type
+ *  reporttype [i] what type of report should be created
+ *  reportinfo [i] NULL or a ptr to a struct with some detailed information
+ *  phandle    [o] ptr, where the resulting handle should be saved
+ *
+ * RESULTS
+ *  SUCCESS  S_OK
+ *  FAILURE  A HRESULT error code
+ *
+ * NOTES
+ *  The event type must be registered at microsoft. Predefined types are
+ *  "APPCRASH" as the default on Windows, "Crash32" and "Crash64"
+ *
+ */
+HRESULT WINAPI WerReportCreate(PCWSTR eventtype, WER_REPORT_TYPE reporttype, PWER_REPORT_INFORMATION reportinfo, HREPORT *pout)
+{
+
+    FIXME("(%s, %d, %p, %p) :stub\n", debugstr_w(eventtype), reporttype, reportinfo, pout);
+    if (reportinfo) {
+        TRACE(".wzFriendlyEventName: %s\n", debugstr_w(reportinfo->wzFriendlyEventName));
+        TRACE(".wzApplicationName: %s\n", debugstr_w(reportinfo->wzApplicationName));
+    }
+
+    if (pout)  *pout = NULL;
+    if (!eventtype || !eventtype[0] || !pout) {
+        return E_INVALIDARG;
+    }
+
+    return E_NOTIMPL;
+}
diff --git a/dlls/wer/wer.spec b/dlls/wer/wer.spec
index b50eb47..6369f85 100644
--- a/dlls/wer/wer.spec
+++ b/dlls/wer/wer.spec
@@ -65,8 +65,8 @@
 @ stdcall WerRemoveExcludedApplication(wstr long)
 @ stub WerReportAddDump
 @ stub WerReportAddFile
-@ stub WerReportCloseHandle
-@ stub WerReportCreate
+@ stdcall WerReportCloseHandle(ptr)
+@ stdcall WerReportCreate(wstr long ptr ptr)
 @ stub WerReportSetParameter
 @ stub WerReportSetUIOption
 @ stub WerReportSubmit
-- 
1.7.1




More information about the wine-patches mailing list