From 8555e948bd0df14bf19df75b80026d6299667a1e Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 5 May 2020 19:26:08 +0200 Subject: [PATCH] kernel32: Move Wer* function stubs to kernelbase. Signed-off-by: Alexandre Julliard --- dlls/kernel32/Makefile.in | 3 +- dlls/kernel32/kernel32.spec | 16 +++--- dlls/kernel32/wer.c | 92 --------------------------------- dlls/kernelbase/debug.c | 82 +++++++++++++++++++++++++++++ dlls/kernelbase/kernelbase.spec | 16 +++--- include/werapi.h | 2 + 6 files changed, 101 insertions(+), 110 deletions(-) delete mode 100644 dlls/kernel32/wer.c diff --git a/dlls/kernel32/Makefile.in b/dlls/kernel32/Makefile.in index a6c9fed5466..4c23ac59b63 100644 --- a/dlls/kernel32/Makefile.in +++ b/dlls/kernel32/Makefile.in @@ -37,8 +37,7 @@ C_SRCS = \ toolhelp.c \ version.c \ virtual.c \ - volume.c \ - wer.c + volume.c RC_SRCS = \ locale_rc.rc \ diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index db9d93e52aa..1bc32e5ef24 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1589,14 +1589,14 @@ @ stdcall -import WaitNamedPipeW (wstr long) @ stdcall WakeAllConditionVariable(ptr) ntdll.RtlWakeAllConditionVariable @ stdcall WakeConditionVariable(ptr) ntdll.RtlWakeConditionVariable -# @ stub WerGetFlags -@ stdcall WerRegisterFile(wstr long long) -@ stdcall WerRegisterMemoryBlock(ptr long) -@ stdcall WerRegisterRuntimeExceptionModule(wstr ptr) -@ stdcall WerSetFlags(long) -# @ stub WerUnregisterFile -@ stdcall WerUnregisterMemoryBlock(ptr) -@ stdcall WerUnregisterRuntimeExceptionModule(wstr ptr) +@ stdcall -import WerGetFlags(ptr ptr) +@ stdcall -import WerRegisterFile(wstr long long) +@ stdcall -import WerRegisterMemoryBlock(ptr long) +@ stdcall -import WerRegisterRuntimeExceptionModule(wstr ptr) +@ stdcall -import WerSetFlags(long) +@ stdcall -import WerUnregisterFile(wstr) +@ stdcall -import WerUnregisterMemoryBlock(ptr) +@ stdcall -import WerUnregisterRuntimeExceptionModule(wstr ptr) # @ stub WerpCleanupMessageMapping # @ stub WerpInitiateRemoteRecovery # @ stub WerpNotifyLoadStringResource diff --git a/dlls/kernel32/wer.c b/dlls/kernel32/wer.c deleted file mode 100644 index 2a7853bde90..00000000000 --- a/dlls/kernel32/wer.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Windows Error Reporting functions - * - * Copyright 2010 Louis Lenders - * - * 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 - -#include "windef.h" -#include "winbase.h" -#include "werapi.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(wer); - -/*********************************************************************** - * WerRegisterFile (KERNEL32.@) - * - * Register a file to be included in WER error report. - */ -HRESULT WINAPI WerRegisterFile(PCWSTR file, WER_REGISTER_FILE_TYPE regfiletype, DWORD flags) -{ - FIXME("(%s, %d, %d) stub!\n", debugstr_w(file), regfiletype, flags); - return E_NOTIMPL; -} - -/*********************************************************************** - * WerRegisterRuntimeExceptionModule (KERNEL32.@) - * - * Register a custom runtime exception handler. - */ - -HRESULT WINAPI WerRegisterRuntimeExceptionModule(PCWSTR callbackdll, PVOID context) -{ - FIXME("(%s, %p) stub!\n", debugstr_w(callbackdll), context); - return S_OK; -} - -/*********************************************************************** - * WerSetFlags (KERNEL32.@) - * - * Sets error reporting flags for the current process. - */ - -HRESULT WINAPI WerSetFlags(DWORD flags) -{ - FIXME("(%d) stub!\n", flags); - return E_NOTIMPL; -} - -/*********************************************************************** - * WerRegisterMemoryBlock (KERNEL32.@) - */ -HRESULT WINAPI WerRegisterMemoryBlock(void *block, DWORD size) -{ - FIXME("(%p %d) stub\n", block, size); - return E_NOTIMPL; -} - -/*********************************************************************** - * WerUnregisterMemoryBlock (KERNEL32.@) - */ -HRESULT WINAPI WerUnregisterMemoryBlock(void *block) -{ - FIXME("(%p) stub\n", block); - return E_NOTIMPL; -} - -/*********************************************************************** - * WerUnregisterRuntimeExceptionModule (KERNEL32.@) - */ -HRESULT WINAPI WerUnregisterRuntimeExceptionModule(PCWSTR callbackdll, PVOID context) -{ - FIXME("(%s, %p) stub!\n", debugstr_w(callbackdll), context); - return S_OK; -} diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c index 60c9d09cf6e..f7457e8a372 100644 --- a/dlls/kernelbase/debug.c +++ b/dlls/kernelbase/debug.c @@ -28,6 +28,7 @@ #include "winternl.h" #include "wingdi.h" #include "winuser.h" +#include "werapi.h" #include "wine/exception.h" #include "wine/server.h" @@ -767,3 +768,84 @@ LONG WINAPI UnhandledExceptionFilter( EXCEPTION_POINTERS *epointers ) } return EXCEPTION_CONTINUE_SEARCH; } + + +/*********************************************************************** + * WerGetFlags (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerGetFlags( HANDLE process, DWORD *flags ) +{ + FIXME( "(%p, %p) stub\n", process, flags ); + return E_NOTIMPL; +} + + +/*********************************************************************** + * WerRegisterFile (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerRegisterFile( const WCHAR *file, WER_REGISTER_FILE_TYPE type, + DWORD flags ) +{ + FIXME( "(%s, %d, %d) stub\n", debugstr_w(file), type, flags ); + return E_NOTIMPL; +} + + +/*********************************************************************** + * WerRegisterMemoryBlock (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerRegisterMemoryBlock( void *block, DWORD size ) +{ + FIXME( "(%p %d) stub\n", block, size ); + return E_NOTIMPL; +} + + +/*********************************************************************** + * WerRegisterRuntimeExceptionModule (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerRegisterRuntimeExceptionModule( const WCHAR *dll, void *context ) +{ + FIXME( "(%s, %p) stub\n", debugstr_w(dll), context ); + return S_OK; +} + + +/*********************************************************************** + * WerSetFlags (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerSetFlags( DWORD flags ) +{ + FIXME("(%d) stub\n", flags); + return E_NOTIMPL; +} + + +/*********************************************************************** + * WerUnregisterFile (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerUnregisterFile( const WCHAR *file ) +{ + FIXME( "(%s) stub\n", debugstr_w(file) ); + return E_NOTIMPL; +} + + +/*********************************************************************** + * WerUnregisterMemoryBlock (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerUnregisterMemoryBlock( void *block ) +{ + FIXME( "(%p) stub\n", block ); + return E_NOTIMPL; +} + + +/*********************************************************************** + * WerUnregisterRuntimeExceptionModule (kernelbase.@) + */ +HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerUnregisterRuntimeExceptionModule( const WCHAR *dll, void *context ) +{ + FIXME( "(%s, %p) stub\n", debugstr_w(dll), context ); + return S_OK; +} diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 904f1704eb1..7b02838298e 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1701,14 +1701,14 @@ @ stdcall WakeByAddressAll(ptr) ntdll.RtlWakeAddressAll @ stdcall WakeByAddressSingle(ptr) ntdll.RtlWakeAddressSingle @ stdcall WakeConditionVariable(ptr) ntdll.RtlWakeConditionVariable -# @ stub WerGetFlags -@ stdcall WerRegisterFile(wstr long long) kernel32.WerRegisterFile -@ stdcall WerRegisterMemoryBlock(ptr long) kernel32.WerRegisterMemoryBlock -@ stdcall WerRegisterRuntimeExceptionModule(wstr ptr) kernel32.WerRegisterRuntimeExceptionModule -@ stdcall WerSetFlags(long) kernel32.WerSetFlags -# @ stub WerUnregisterFile -@ stdcall WerUnregisterMemoryBlock(ptr) kernel32.WerUnregisterMemoryBlock -@ stdcall WerUnregisterRuntimeExceptionModule(wstr ptr) kernel32.WerUnregisterRuntimeExceptionModule +@ stdcall WerGetFlags(ptr ptr) +@ stdcall WerRegisterFile(wstr long long) +@ stdcall WerRegisterMemoryBlock(ptr long) +@ stdcall WerRegisterRuntimeExceptionModule(wstr ptr) +@ stdcall WerSetFlags(long) +@ stdcall WerUnregisterFile(wstr) +@ stdcall WerUnregisterMemoryBlock(ptr) +@ stdcall WerUnregisterRuntimeExceptionModule(wstr ptr) # @ stub WerpNotifyLoadStringResource # @ stub WerpNotifyUseStringResource @ stdcall WideCharToMultiByte(long long wstr long ptr long ptr ptr) diff --git a/include/werapi.h b/include/werapi.h index 247c6121755..30ba6cd9505 100644 --- a/include/werapi.h +++ b/include/werapi.h @@ -174,6 +174,7 @@ typedef struct _WER_EXCEPTION_INFORMATION /* #### */ HRESULT WINAPI WerAddExcludedApplication(PCWSTR, BOOL); +HRESULT WINAPI WerGetFlags(HANDLE process, DWORD *flags); HRESULT WINAPI WerRegisterFile(PCWSTR file, WER_REGISTER_FILE_TYPE regfiletype, DWORD flags); HRESULT WINAPI WerRegisterMemoryBlock(void *block, DWORD size); HRESULT WINAPI WerRegisterRuntimeExceptionModule(PCWSTR callbackdll, void *context); @@ -185,6 +186,7 @@ HRESULT WINAPI WerReportSetParameter(HREPORT, DWORD, PCWSTR, PCWSTR); HRESULT WINAPI WerReportSetUIOption(HREPORT, WER_REPORT_UI, PCWSTR); HRESULT WINAPI WerReportSubmit(HREPORT, WER_CONSENT, DWORD, PWER_SUBMIT_RESULT); HRESULT WINAPI WerSetFlags(DWORD flags); +HRESULT WINAPI WerUnregisterFile(PCWSTR file); HRESULT WINAPI WerUnregisterMemoryBlock(void *block); HRESULT WINAPI WerUnregisterRuntimeExceptionModule(PCWSTR callbackdll, void *context);