ReactOS 0.4.17-dev-812-ged4f258
faultrep.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winreg.h"
#include "wine/debug.h"
#include "errorrep.h"
Include dependency graph for faultrep.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (faultrep)
 
BOOL WINAPI AddERExcludedApplicationW (LPCWSTR lpAppFileName)
 
BOOL WINAPI AddERExcludedApplicationA (LPCSTR lpAppFileName)
 
EFaultRepRetVal WINAPI ReportFault (LPEXCEPTION_POINTERS pep, DWORD dwOpt)
 

Function Documentation

◆ AddERExcludedApplicationA()

BOOL WINAPI AddERExcludedApplicationA ( LPCSTR  lpAppFileName)

Definition at line 82 of file faultrep.c.

83{
84 int len = MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, NULL, 0);
85 WCHAR *wstr;
86 BOOL ret;
87
88 TRACE("(%s)\n", wine_dbgstr_a(lpAppFileName));
89 if (len == 0)
90 return FALSE;
91 wstr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
92 MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, wstr, len);
94 HeapFree(GetProcessHeap(), 0, wstr);
95 return ret;
96}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define MultiByteToWideChar
Definition: compat.h:110
BOOL WINAPI AddERExcludedApplicationW(LPCWSTR lpAppFileName)
Definition: faultrep.c:49
return ret
Definition: mutex.c:147
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum GLsizei len
Definition: glext.h:6722
short WCHAR
Definition: pedump.c:58
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
Definition: debug.h:152
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by test_AddERExcludedApplicationA().

◆ AddERExcludedApplicationW()

BOOL WINAPI AddERExcludedApplicationW ( LPCWSTR  lpAppFileName)

Definition at line 49 of file faultrep.c.

50{
51 WCHAR *bslash;
52 DWORD value = 1;
53 HKEY hkey;
54 LONG res;
55
56 TRACE("(%s)\n", wine_dbgstr_w(lpAppFileName));
57 bslash = wcsrchr(lpAppFileName, '\\');
58 if (bslash != NULL)
59 lpAppFileName = bslash + 1;
60 if (*lpAppFileName == '\0')
61 {
63 return FALSE;
64 }
65
67 L"Software\\Microsoft\\PCHealth\\ErrorReporting\\ExclusionList", &hkey);
68 if (!res)
69 {
70 RegSetValueExW(hkey, lpAppFileName, 0, REG_DWORD, (LPBYTE)&value, sizeof(value));
71 RegCloseKey(hkey);
72 }
73
74 return !res;
75}
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define wcsrchr
Definition: compat.h:16
#define SetLastError(x)
Definition: compat.h:752
#define L(x)
Definition: resources.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
#define wine_dbgstr_w
Definition: kernel32.h:34
long LONG
Definition: pedump.c:60
#define REG_DWORD
Definition: sdbapi.c:615
unsigned char * LPBYTE
Definition: typedefs.h:53
Definition: pdh_main.c:96
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by AddERExcludedApplicationA().

◆ ReportFault()

EFaultRepRetVal WINAPI ReportFault ( LPEXCEPTION_POINTERS  pep,
DWORD  dwOpt 
)

Definition at line 101 of file faultrep.c.

102{
103 FIXME("%p 0x%lx stub\n", pep, dwOpt);
104 return frrvOk;
105}
#define FIXME(fmt,...)
Definition: precomp.h:53

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( faultrep  )