wer: Add stub for WerReportAddDump

André Hentschel nerv at dawncrow.de
Sun Sep 25 13:31:11 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=28484
---
 dlls/wer/main.c   |   29 +++++++++++++++++++++++++++++
 dlls/wer/wer.spec |    2 +-
 include/werapi.h  |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 1 deletions(-)

diff --git a/dlls/wer/main.c b/dlls/wer/main.c
index 0d43c0e..d68d652 100644
--- a/dlls/wer/main.c
+++ b/dlls/wer/main.c
@@ -170,6 +170,35 @@ HRESULT WINAPI WerRemoveExcludedApplication(PCWSTR exeName, BOOL allUsers)
 }
 
 /***********************************************************************
+ * WerReportAddDump (wer.@)
+ *
+ * Add a dump of dumpType to hReportHandle.
+ *
+ * PARAMS
+ *  hReportHandle      [i] error reporting handle to add the dump
+ *  hProcess           [i] handle to the regarding process
+ *  hThread            [o] handle to the regarding thread
+ *  dumpType           [i] type of the dump
+ *  pExceptionParam    [o] pointer to a WER_EXCEPTION_INFORMATION
+ *  pDumpCustomOptions [o] pointer to a WER_DUMP_CUSTOM_OPTIONS
+ *  dwFlags            [i] flag to control the heap dump
+ *
+ * RETURNS
+ *  Success: S_OK
+ *  Failure: A HRESULT error code
+ *
+ */
+HRESULT WINAPI WerReportAddDump(HREPORT hReportHandle, HANDLE hProcess, HANDLE hThread,
+                                WER_DUMP_TYPE dumpType, PWER_EXCEPTION_INFORMATION pExceptionParam,
+                                PWER_DUMP_CUSTOM_OPTIONS pDumpCustomOptions, DWORD dwFlags)
+{
+    FIXME("(%p, %p, %p, %d, %p, %p, %u) :stub\n", hReportHandle, hProcess, hThread, dumpType,
+          pExceptionParam, pDumpCustomOptions, dwFlags);
+
+    return E_NOTIMPL;
+}
+
+/***********************************************************************
  * WerReportCloseHandle (wer.@)
  *
  * Close an error reporting handle and free associated resources
diff --git a/dlls/wer/wer.spec b/dlls/wer/wer.spec
index 4303c20..bfc39e4 100644
--- a/dlls/wer/wer.spec
+++ b/dlls/wer/wer.spec
@@ -63,7 +63,7 @@
 @ stub WerpSvcReportFromMachineQueue
 @ stdcall WerAddExcludedApplication(wstr long)
 @ stdcall WerRemoveExcludedApplication(wstr long)
-@ stub WerReportAddDump
+@ stdcall WerReportAddDump(ptr ptr ptr long ptr ptr long)
 @ stub WerReportAddFile
 @ stdcall WerReportCloseHandle(ptr)
 @ stdcall WerReportCreate(wstr long ptr ptr)
diff --git a/include/werapi.h b/include/werapi.h
index 2486d3d..e8ec487 100644
--- a/include/werapi.h
+++ b/include/werapi.h
@@ -54,6 +54,9 @@ extern "C" {
 #define WER_SUBMIT_ARCHIVE_PARAMETERS_ONLY  0x1000
 #define WER_SUBMIT_REPORT_MACHINE_ID        0x2000
 
+#define WER_MAX_PREFERRED_MODULES           128
+#define WER_MAX_PREFERRED_MODULES_BUFFER    256
+
 /* #### */
 
 typedef HANDLE HREPORT;
@@ -110,6 +113,38 @@ typedef enum _WER_SUBMIT_RESULT
     WerCustomAction
 } WER_SUBMIT_RESULT, *PWER_SUBMIT_RESULT;
 
+typedef enum _WER_DUMP_TYPE
+{
+    WerDumpTypeMicroDump = 1,
+    WerDumpTypeMiniDump,
+    WerDumpTypeHeapDump,
+    WerDumpTypeMax
+} WER_DUMP_TYPE;
+
+/* #### */
+
+typedef struct _WER_DUMP_CUSTOM_OPTIONS
+{
+    DWORD dwSize;
+    DWORD dwMask;
+    DWORD dwDumpFlags;
+    BOOL  bOnlyThisThread;
+    DWORD dwExceptionThreadFlags;
+    DWORD dwOtherThreadFlags;
+    DWORD dwExceptionThreadExFlags;
+    DWORD dwOtherThreadExFlags;
+    DWORD dwPreferredModuleFlags;
+    DWORD dwOtherModuleFlags;
+    WCHAR wzPreferredModuleList[WER_MAX_PREFERRED_MODULES_BUFFER];
+
+} WER_DUMP_CUSTOM_OPTIONS, *PWER_DUMP_CUSTOM_OPTIONS;
+
+typedef struct _WER_EXCEPTION_INFORMATION
+{
+    PEXCEPTION_POINTERS pExceptionPointers;
+    BOOL bClientPointers;
+} WER_EXCEPTION_INFORMATION, *PWER_EXCEPTION_INFORMATION;
+
 /* #### */
 
 HRESULT WINAPI WerAddExcludedApplication(PCWSTR, BOOL);
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list