~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/faultrep/faultrep.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /* Fault report handling
  2  *
  3  * Copyright 2007 Peter Dons Tychsen
  4  *
  5  * This library is free software; you can redistribute it and/or
  6  * modify it under the terms of the GNU Lesser General Public
  7  * License as published by the Free Software Foundation; either
  8  * version 2.1 of the License, or (at your option) any later version.
  9  *
 10  * This library is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 13  * Lesser General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU Lesser General Public
 16  * License along with this library; if not, write to the Free Software
 17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 18  */
 19 
 20 #include <stdarg.h>
 21 
 22 #include "windef.h"
 23 #include "winbase.h"
 24 #include "winnls.h"
 25 #include "winreg.h"
 26 #include "wine/debug.h"
 27 #include "wine/unicode.h"
 28 
 29 #include "errorrep.h"
 30 
 31 WINE_DEFAULT_DEBUG_CHANNEL(faultrep);
 32 
 33 static const WCHAR SZ_EXCLUSIONLIST_KEY[] = {
 34     'S','o','f','t','w','a','r','e','\\',
 35     'M','i','c','r','o','s','o','f','t','\\',
 36     'P','C','H','e','a','l','t','h','\\',
 37     'E','r','r','o','r','R','e','p','o','r','t','i','n','g','\\',
 38     'E','x','c','l','u','s','i','o','n','L','i','s','t', 0};
 39 
 40 /*************************************************************************
 41  * AddERExcludedApplicationW  [FAULTREP.@]
 42  *
 43  * Adds an application to a list of applications for which fault reports
 44  * shouldn't be generated
 45  *
 46  * PARAMS
 47  * lpAppFileName  [I] The filename of the application executable
 48  *
 49  * RETURNS
 50  * TRUE on success, FALSE of failure
 51  *
 52  * NOTES
 53  * Wine doesn't use this data but stores it in the registry (in the same place
 54  * as Windows would) in case it will be useful in a future version
 55  *
 56  * According to MSDN this function should succeed even if the user has no write
 57  * access to HKLM. This probably means that there is no error checking.
 58  */
 59 BOOL WINAPI AddERExcludedApplicationW(LPCWSTR lpAppFileName)
 60 {
 61     WCHAR *bslash;
 62     DWORD value = 1;
 63     HKEY hkey;
 64 
 65     TRACE("(%s)\n", wine_dbgstr_w(lpAppFileName));
 66     bslash = strrchrW(lpAppFileName, '\\');
 67     if (bslash != NULL)
 68         lpAppFileName = bslash + 1;
 69     if (*lpAppFileName == '\0')
 70     {
 71         SetLastError(ERROR_INVALID_PARAMETER);
 72         return FALSE;
 73     }
 74 
 75     if (!RegCreateKeyW(HKEY_LOCAL_MACHINE, SZ_EXCLUSIONLIST_KEY, &hkey))
 76     {
 77         RegSetValueExW(hkey, lpAppFileName, 0, REG_DWORD, (LPBYTE)&value, sizeof(value));
 78         RegCloseKey(hkey);
 79     }
 80 
 81     return TRUE;
 82 }
 83 
 84 /*************************************************************************
 85  * AddERExcludedApplicationA  [FAULTREP.@]
 86  *
 87  * See AddERExcludedApplicationW
 88  */
 89 BOOL WINAPI AddERExcludedApplicationA(LPCSTR lpAppFileName)
 90 {
 91     int len = MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, NULL, 0);
 92     WCHAR *wstr;
 93     BOOL ret;
 94 
 95     TRACE("(%s)\n", wine_dbgstr_a(lpAppFileName));
 96     if (len == 0)
 97         return FALSE;
 98     wstr = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR)*len);
 99     MultiByteToWideChar(CP_ACP, 0, lpAppFileName, -1, wstr, len);
100     ret = AddERExcludedApplicationW(wstr);
101     HeapFree(GetProcessHeap(), 0, wstr);
102     return ret;
103 }
104 
105 /*************************************************************************
106  * ReportFault  [FAULTREP.@]
107  */
108 EFaultRepRetVal WINAPI ReportFault(LPEXCEPTION_POINTERS pep, DWORD dwOpt)
109 {
110     FIXME("%p 0x%x stub\n", pep, dwOpt);
111     return frrvOk;
112 }
113 
114 /***********************************************************************
115  * DllMain.
116  */
117 BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved)
118 {
119     switch(reason)
120     {
121     case DLL_WINE_PREATTACH:
122         return FALSE;
123     case DLL_PROCESS_ATTACH:
124         DisableThreadLibraryCalls(inst);
125         break;
126     case DLL_PROCESS_DETACH:
127         break;
128     }
129     return TRUE;
130 }
131 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.