{"id":109274,"date":"2024-01-16T07:00:00","date_gmt":"2024-01-16T15:00:00","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/oldnewthing\/?p=109274"},"modified":"2024-01-15T19:10:14","modified_gmt":"2024-01-16T03:10:14","slug":"20240116-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20240116-00\/?p=109274","title":{"rendered":"What is a hard error, and what makes it harder than an easy error?"},"content":{"rendered":"<p>Occasionally, you may see a reference in Windows to &#8220;hard errors&#8221;, such as in this article that shows <a title=\"How to change hard error popup handling in Windows\" href=\"https:\/\/learn.microsoft.com\/en-us\/troubleshoot\/windows\/win32\/hard-error-popup-mode\"> how to configure an unattended system so that it auto-answers hard error dialogs<\/a>. But why is it called a &#8220;hard error&#8221;? Are there &#8220;easy errors&#8221;?<\/p>\n<p>In 16-bit Windows, if there was an I\/O error reading a drive, you got an error message that looked like this:<\/p>\n<table style=\"border: solid 1px black; font-family: System, sans-serif; font-weight: bold; width: 40em; background-color: white;\" border=\"0\">\n<tbody>\n<tr>\n<td style=\"padding: 1em 0px 2em 0px; background-color: white; color: black;\" align=\"center\" nowrap=\"nowrap\">System Error<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-bottom: 2em; background-color: white; color: black;\" align=\"center\" nowrap=\"nowrap\">Cannot read from drive B.<\/td>\n<\/tr>\n<tr>\n<td style=\"padding-bottom: 1em; background-color: white; color: black;\" align=\"center\" nowrap=\"nowrap\">\n<div style=\"width: 8em; padding: 2px; display: inline-block; background: #C0C0C0; margin-right: 2em; border: 2px outset #C0C0C0;\">\n<div style=\"border: 1px none black; padding: .5em;\"><u>A<\/u>bort<\/div>\n<\/div>\n<div style=\"width: 8em; padding: 2px; display: inline-block; background: #C0C0C0; margin-right: 2em; border: 2px outset #C0C0C0;\">\n<div style=\"border: 1px none black; padding: .5em;\"><u>R<\/u>etry<\/div>\n<\/div>\n<div style=\"width: 8em; padding: 2px; display: inline-block; background: #C0C0C0; border: 2px outset #C0C0C0;\">\n<div style=\"border: 1px dotted black; padding: .5em;\"><u>C<\/u>ancel<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These messages were special because they were generated from inside the I\/O system, below the user interface level. Windows can&#8217;t put up a traditional <code>MessageBox<\/code> because that pumps messages and allows application code to run at a time when the rules of co-operative multitasking say that application code should not be running.<\/p>\n<p>The code to display these special &#8220;hard system modal errors&#8221; was carefully written so as to rely only on parts of the user interface code that were re-entrant. In fact, the only user interface code it uses is processing mouse and keyboard input. All of the graphics are drawn by asking GDI to draw directly to the frame buffer, and all of the dialog behaviors are handwritten. No application code was allowed to run while this message was being shown to the user.<\/p>\n<p>The opposite of the &#8220;hard error&#8221; message was the &#8220;soft error&#8221; message, which was your regular <code>MessageBox<\/code>.<\/p>\n<p>These types of hard error messages disappeared from 32-bit Windows, but the name got repurposed to describe other types of critical error messages, usually low-level ones.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A throwback to the early days of 16-bit Windows.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-109274","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>A throwback to the early days of 16-bit Windows.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/109274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=109274"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/109274\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=109274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=109274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=109274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}