{"id":15543,"date":"2009-12-24T07:00:00","date_gmt":"2009-12-24T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2009\/12\/24\/why-dont-we-create-a-special-class-of-programs-which-can-break-the-normal-rules\/"},"modified":"2009-12-24T07:00:00","modified_gmt":"2009-12-24T07:00:00","slug":"why-dont-we-create-a-special-class-of-programs-which-can-break-the-normal-rules","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20091224-00\/?p=15543","title":{"rendered":"Why don&#039;t we create a special class of programs which can break the normal rules?"},"content":{"rendered":"<p>In response to a discussion of why the window handle limit is 10,000, commenter Juan wondered <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2007\/07\/18\/3926581.aspx#3938322\"> why we don&#8217;t create a special class of programs which can exceed the 10,000 handle limit<\/a> and otherwise bypass the normal operation of the system.\n This is another case of the tragedy of special treatment: <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2008\/10\/06\/8969399.aspx\"> Eventually, nothing is special any more<\/a>.\n If there were a way for an application to say, &#8220;Hey, I don&#8217;t want to be constrained by the normal rules that apply to your everyday boring applications,&#8221; then every application <i>would simply say it<\/i>, and the net effect would be that the constraint no longer applies to anybody.<\/p>\n<p> Task Manager conforms to the normal rules for GUI programs because <a href=\"http:\/\/blogs.msdn.com\/oldnewthing\/archive\/2008\/09\/22\/8960761.aspx#8962451\"> if it marked itself as special<\/a>, soon everybody would mark themselves as special in order to get the same special treatment. (Besides, the special treatment doesn&#8217;t help Task Manager at all, since Task Manager doesn&#8217;t create 10,000 handles. The specific issue in the comment is not something Task Manager even knows that it needs to opt out of. All it did was call <code>CreateWindow<\/code>; Task Manager shouldn&#8217;t need to know about the internal implementation of <code>CreateWindow<\/code>.) <\/p>\n<p><b>Bonus chatter<\/b><\/p>\n<p>: There is already <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/bb625963.aspx\"> one mechanism for applications to say that a particular class of restrictions should not apply to them<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In response to a discussion of why the window handle limit is 10,000, commenter Juan wondered why we don&#8217;t create a special class of programs which can exceed the 10,000 handle limit and otherwise bypass the normal operation of the system. This is another case of the tragedy of special treatment: Eventually, nothing is special [&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":[25],"class_list":["post-15543","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>In response to a discussion of why the window handle limit is 10,000, commenter Juan wondered why we don&#8217;t create a special class of programs which can exceed the 10,000 handle limit and otherwise bypass the normal operation of the system. This is another case of the tragedy of special treatment: Eventually, nothing is special [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/15543","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=15543"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/15543\/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=15543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=15543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=15543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}