From de5e0cbbf8cd42695eddca4f4ba22743c27c27b9 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Mon, 1 Nov 2010 09:22:03 +0100 Subject: [PATCH] wer: Add stubs for WerReportCreate + WerReportCloseHandle. --- dlls/wer/main.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/wer/wer.spec | 4 ++-- 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/dlls/wer/main.c b/dlls/wer/main.c index a283baeb028..b577b6b47e1 100644 --- a/dlls/wer/main.c +++ b/dlls/wer/main.c @@ -22,6 +22,7 @@ #include "windef.h" #include "winbase.h" +#include "werapi.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(wer); @@ -69,3 +70,60 @@ HRESULT WINAPI WerRemoveExcludedApplication(PCWSTR exeName, BOOL allUsers) FIXME("(%s, %d) :stub\n",debugstr_w(exeName), allUsers); return E_NOTIMPL; } + +/*********************************************************************** + * WerReportCloseHandle (wer.@) + * + * Close an error reporting handle and free associated resources + * + * PARAMS + * hreport [i] error reporting handle to close + * + * RETURNS + * Success: S_OK + * Failure: A HRESULT error code + * + */ +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 + * + * RETURNS + * 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 *phandle) +{ + + FIXME("(%s, %d, %p, %p) :stub\n", debugstr_w(eventtype), reporttype, reportinfo, phandle); + if (reportinfo) { + TRACE(".wzFriendlyEventName: %s\n", debugstr_w(reportinfo->wzFriendlyEventName)); + TRACE(".wzApplicationName: %s\n", debugstr_w(reportinfo->wzApplicationName)); + } + + if (phandle) *phandle = NULL; + if (!eventtype || !eventtype[0] || !phandle) { + return E_INVALIDARG; + } + + return E_NOTIMPL; +} diff --git a/dlls/wer/wer.spec b/dlls/wer/wer.spec index b50eb477f5f..6369f85382e 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