summaryrefslogtreecommitdiffstats
path: root/chrome/app/hard_error_handler_win.h
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 18:24:38 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 18:24:38 +0000
commitf38b16fd2753b2d603e0a2a137227a132c77057b (patch)
tree47196cdec0752b96c5669830ba4ebc2bbad2c9ec /chrome/app/hard_error_handler_win.h
parent45aa74cc70c63a3a904007f9c84c1f73d9c2a35f (diff)
downloadchromium_src-f38b16fd2753b2d603e0a2a137227a132c77057b.zip
chromium_src-f38b16fd2753b2d603e0a2a137227a132c77057b.tar.gz
chromium_src-f38b16fd2753b2d603e0a2a137227a132c77057b.tar.bz2
Adds 'hard error' message box support
- Initially just the two failed to delay-load bind exceptions - Shows the same error dialog as the OS shows so no localization required TEST= hard to test, but I'll give some pointers on the bug BUG = 11919 Review URL: http://codereview.chromium.org/113492 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/hard_error_handler_win.h')
-rw-r--r--chrome/app/hard_error_handler_win.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/app/hard_error_handler_win.h b/chrome/app/hard_error_handler_win.h
new file mode 100644
index 0000000..51b16b45
--- /dev/null
+++ b/chrome/app/hard_error_handler_win.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// The routines in this file are windows-specific helper functions to deal
+// with critical errors which the user can do something about.
+
+#ifndef CHROME_APP_HARD_ERROR_HANDLER_WIN_H_
+#define CHROME_APP_HARD_ERROR_HANDLER_WIN_H_
+
+#include <windows.h>
+
+// Two exceptions can be thrown when delay-laoding DLLs:
+// - Failed to load a DLL. The common reason is because it cannot be found.
+// - Failed to bind to an entry point. Typically because the DLL is too old.
+// These exceptions cause the termination of the program, but it is desirable
+// to first inform the user the name of the module or the name of the entry
+// point so he or she can get help.
+// This function does exactly that. When an exception is captured and passed
+// to this function, it will display a message box with the relevant
+// information and return true if the exception is generated by the delay-load
+// feature or else do nothing and return false.
+bool DelayLoadFailureExceptionMessageBox(EXCEPTION_POINTERS* ex_info);
+
+// Generates a Popup dialog indicating that the entry point |entry| could
+// not be found in dll |module|. The dialog is generated by CSRSS so this
+// function can be called inside an exception handler.
+void EntryPointNotFoundHardError(const char* entry, const char* module);
+
+// Generates a Popup dialog indicating that the dll |module| could not be found.
+// The dialog is generated by CSRSS so this function can be called inside an
+// exception handler.
+void ModuleNotFoundHardError(const char* module);
+
+#endif // CHROME_APP_HARD_ERROR_HANDLER_WIN_H_
+