{"id":34143,"date":"2005-09-19T10:00:14","date_gmt":"2005-09-19T10:00:14","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2005\/09\/19\/corrections-to-the-answers-i-gave-at-the-end-of-my-pdc-talk\/"},"modified":"2005-09-19T10:00:14","modified_gmt":"2005-09-19T10:00:14","slug":"corrections-to-the-answers-i-gave-at-the-end-of-my-pdc-talk","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050919-14\/?p=34143","title":{"rendered":"Corrections to the answers I gave at the end of my PDC talk"},"content":{"rendered":"<p>I guess one advantage of having a web site is that I can publish errata. I haven&#8217;t watched <a href=\"https:\/\/channel9.msdn.com\/ShowPost.aspx?PostID=116704\"> the Channel9 video<\/a> (and probably never will; it&#8217;s hard to watch yourself), but I do remember some of the questions at the end that I wasn&#8217;t able to answer off the top of my head, but after a few days&#8217; research I think I can do it now.<\/p>\n<p> The person who asked &#8220;When I call <code>MessageBox<\/code> from my MFC application and shut down the system, why does my application crash?&#8221; stopped by the Fundamentals Lounge later that day, and we went into more detail about his problem. It turns out that he was a victim of one of the bullet points I called out in the section on parents and owners: He was passing NULL as the owner window to <code>MessageBox<\/code>, which created two top-level unowned windows on the same thread, something I also explained earlier this year <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2005\/02\/23\/378866.aspx\"> when discussing the importance of setting the correct owner for modal UI<\/a>. As a result, the handling of the shutdown message resulted in the support for the message box being torn down while it was still live on the stack. (I didn&#8217;t cover this in my talk because I didn&#8217;t want to bore people with information they could already have gotten by reading my earlier articles. After all, the talk wasn&#8217;t titled &#8220;Raymond&#8217;s Greatest Hits&#8221;.) <\/p>\n<p> I made a mistake in my answer to the question about transferring input due to a mistaken input queue assignment due to a hole in a regional window. In fact, the message does not move between input queues; the window manager does a full hit-test against the region before deciding which input queue gets the message. The point of queue transfer is not to transfer the message, as I mistakenly described, but rather is to transfer the wake flag. If there are two input messages in an input queue, one for thread&nbsp;A and the second for thread&nbsp;B, then it is thread&nbsp;A that is woken first to process the input. When thread&nbsp;A processes the first message and then goes back to ask for the second message, the queue manager sees that the next message in the input queue is for thread&nbsp;B. At this point, it wakes up thread&nbsp;B and tells it that it is being woken due to an input transfer: &#8220;It&#8217;s your turn now.&#8221; <\/p>\n<p> It so happens that as you all came to my talk to check me out, I had spies in the crowd checking <strong>you<\/strong> out. <a href=\"http:\/\/blogs.msdn.com\/saraford\/\"> Sara Ford<\/a>, a Microsoft celebrity in her own right, told me that the buzz in the crowd was that I&#8217;m so short. Well, in my defense, I would like to point out that being on a raised platform makes me look shorter since the front of the table takes about six inches off my height due to the angle. <\/p>\n<p> But yeah, I&#8217;m short. <\/p>\n<p> And I&#8217;ll take it as a compliment that you don&#8217;t consider me to be <a href=\"http:\/\/blog.ziffdavis.com\/devlife\/archive\/2005\/09\/15\/30076.aspx\"> old<\/a> or <a href=\"https:\/\/channel9.msdn.com#116725\"> fat<\/a>. <\/p>\n<p> For those who were wondering: What was I doing when I was fiddling with the second computer on the table? That computer was running a giant clock program so I could see how I was doing on time. For some strange reason, the standard PDC equipment for a talk doesn&#8217;t include a clock! I was fiddling with it because I forgot to disable the screen saver, so I had to wake up the computer periodically in order to keep the clock visible. <\/p>\n<p> Note that I never said <a href=\"https:\/\/channel9.msdn.com#116708\"> that I never wanted to be on video<\/a>. What I said was that <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2005\/07\/14\/438836.aspx\"> I don&#8217;t do interviews<\/a>. <\/p>\n<p> Assuming the PDC organizers ask me back for the next PDC (big assumption) what do you think the title of my next talk should be? <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I guess one advantage of having a web site is that I can publish errata. I haven&#8217;t watched the Channel9 video (and probably never will; it&#8217;s hard to watch yourself), but I do remember some of the questions at the end that I wasn&#8217;t able to answer off the top of my head, but after [&hellip;]<\/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":[26],"class_list":["post-34143","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-other"],"acf":[],"blog_post_summary":"<p>I guess one advantage of having a web site is that I can publish errata. I haven&#8217;t watched the Channel9 video (and probably never will; it&#8217;s hard to watch yourself), but I do remember some of the questions at the end that I wasn&#8217;t able to answer off the top of my head, but after [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/34143","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=34143"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/34143\/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=34143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=34143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=34143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}