{"id":11973,"date":"2010-12-20T07:00:00","date_gmt":"2010-12-20T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2010\/12\/20\/what-happened-to-the-return-code-from-winmain-in-16-bit-windows\/"},"modified":"2010-12-20T07:00:00","modified_gmt":"2010-12-20T07:00:00","slug":"what-happened-to-the-return-code-from-winmain-in-16-bit-windows","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20101220-00\/?p=11973","title":{"rendered":"What happened to the return code from WinMain in 16-bit Windows?"},"content":{"rendered":"<p>Commenter S asks, &#8220;<a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/pages\/407234.aspx#2645703\">What happened to the return code from WinMain in a Windows 3.1 app<\/a>?&#8221; After all, there was no <code>GetExitCodeProcess<\/code> function in 16-bit Windows.\n Basically, the exit code vanished into the ether.\n Unless you captured it.\n The Toolhelp library provided a low-level hook into various parts of the kernel, allowing you to monitor, among other things, the creation and destruction of tasks. That was <a href=\"http:\/\/support.microsoft.com\/kb\/84456\"> how you captured the return code of a Windows program in 16-bit Windows<\/a>.<\/p>\n<p> But if you didn&#8217;t catch it as it happened, it was gone forever, lost in the ether. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Commenter S asks, &#8220;What happened to the return code from WinMain in a Windows 3.1 app?&#8221; After all, there was no GetExitCodeProcess function in 16-bit Windows. Basically, the exit code vanished into the ether. Unless you captured it. The Toolhelp library provided a low-level hook into various parts of the kernel, allowing you to monitor, [&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":[2],"class_list":["post-11973","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>Commenter S asks, &#8220;What happened to the return code from WinMain in a Windows 3.1 app?&#8221; After all, there was no GetExitCodeProcess function in 16-bit Windows. Basically, the exit code vanished into the ether. Unless you captured it. The Toolhelp library provided a low-level hook into various parts of the kernel, allowing you to monitor, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11973","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=11973"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/11973\/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=11973"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=11973"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=11973"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}