ReactOS  0.4.15-dev-1070-ge1a01de
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)
 
BOOL WINAPI DllMain (HINSTANCE inst, DWORD reason, LPVOID reserved)
 

Variables

static const WCHAR SZ_EXCLUSIONLIST_KEY []
 

Function Documentation

◆ AddERExcludedApplicationA()

BOOL WINAPI AddERExcludedApplicationA ( LPCSTR  lpAppFileName)

Definition at line 88 of file faultrep.c.

89 {
90  int len = MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, NULL, 0);
91  WCHAR *wstr;
92  BOOL ret;
93 
94  TRACE("(%s)\n", wine_dbgstr_a(lpAppFileName));
95  if (len == 0)
96  return FALSE;
97  wstr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
98  MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, wstr, len);
100  HeapFree(GetProcessHeap(), 0, wstr);
101  return ret;
102 }
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
Definition: debug.h:186
#define CP_ACP
Definition: compat.h:109
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI AddERExcludedApplicationW(LPCWSTR lpAppFileName)
Definition: faultrep.c:56
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define MultiByteToWideChar
Definition: compat.h:110
#define HeapFree(x, y, z)
Definition: compat.h:483

Referenced by test_AddERExcludedApplicationA().

◆ AddERExcludedApplicationW()

BOOL WINAPI AddERExcludedApplicationW ( LPCWSTR  lpAppFileName)

Definition at line 56 of file faultrep.c.

57 {
58  WCHAR *bslash;
59  DWORD value = 1;
60  HKEY hkey;
61  LONG res;
62 
63  TRACE("(%s)\n", wine_dbgstr_w(lpAppFileName));
64  bslash = wcsrchr(lpAppFileName, '\\');
65  if (bslash != NULL)
66  lpAppFileName = bslash + 1;
67  if (*lpAppFileName == '\0')
68  {
70  return FALSE;
71  }
72 
74  if (!res)
75  {
76  RegSetValueExW(hkey, lpAppFileName, 0, REG_DWORD, (LPBYTE)&value, sizeof(value));
77  RegCloseKey(hkey);
78  }
79 
80  return !res;
81 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
static const WCHAR SZ_EXCLUSIONLIST_KEY[]
Definition: faultrep.c:32
smooth NULL
Definition: ftsmooth.c:416
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:4895
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:500
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1199
#define wcsrchr
Definition: compat.h:16
GLuint res
Definition: glext.h:9613
#define REG_DWORD
Definition: sdbapi.c:596
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by AddERExcludedApplicationA().

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  inst,
DWORD  reason,
LPVOID  reserved 
)

Definition at line 116 of file faultrep.c.

117 {
118  switch(reason)
119  {
120  case DLL_WINE_PREATTACH:
121  return FALSE;
122  case DLL_PROCESS_ATTACH:
124  break;
125  }
126  return TRUE;
127 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define FALSE
Definition: types.h:117
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904

◆ ReportFault()

EFaultRepRetVal WINAPI ReportFault ( LPEXCEPTION_POINTERS  pep,
DWORD  dwOpt 
)

Definition at line 107 of file faultrep.c.

108 {
109  FIXME("%p 0x%x stub\n", pep, dwOpt);
110  return frrvOk;
111 }
#define FIXME(fmt,...)
Definition: debug.h:111

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( faultrep  )

Variable Documentation

◆ SZ_EXCLUSIONLIST_KEY

const WCHAR SZ_EXCLUSIONLIST_KEY[]
static
Initial value:
= {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'P','C','H','e','a','l','t','h','\\',
'E','r','r','o','r','R','e','p','o','r','t','i','n','g','\\',
'E','x','c','l','u','s','i','o','n','L','i','s','t', 0}

Definition at line 32 of file faultrep.c.

Referenced by AddERExcludedApplicationW().