{"id":3204,"date":"2020-10-23T09:59:45","date_gmt":"2020-10-23T01:59:45","guid":{"rendered":"https:\/\/www.aoisnow.net\/blog\/?p=3204"},"modified":"2020-10-23T09:59:45","modified_gmt":"2020-10-23T01:59:45","slug":"tont-33613-%e5%bd%93%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e8%ae%a4%e4%b8%ba%e7%b3%bb%e7%bb%9f%e6%b0%b8%e8%bf%9c%e9%83%bd%e4%b8%8d%e4%bc%9a%e5%8f%98%e7%9a%84%e6%97%b6%e5%80%99%ef%bc%9a%e7%ac%ac1","status":"publish","type":"post","link":"https:\/\/www.aoisnow.net\/blog\/archives\/3204","title":{"rendered":"TONT 33613 \u5f53\u5e94\u7528\u7a0b\u5e8f\u8ba4\u4e3a\u7cfb\u7edf\u6c38\u8fdc\u90fd\u4e0d\u4f1a\u53d8\u7684\u65f6\u5019\uff1a\u7b2c1\u7ae0"},"content":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1a<a href=\"https:\/\/devblogs.microsoft.com\/oldnewthing\/20051026-44\/?p=33613\" target=\"_blank\" rel=\"noopener\">https:\/\/devblogs.microsoft.com\/oldnewthing\/20051026-44\/?p=33613<\/a><\/p>\n<p>An example, all too frequent, of ways programs assume that the user interface will never change is reaching into system binaries and sucking out undocumented resources. In the shell, we have fallen into the reluctant position of carrying \u201cdead\u201d icons around for the benefit of programs that assumed that they would always be available. However, we often make these \u201corphaned\u201d icons blank so that these programs don\u2019t crash, but they don\u2019t necessarily look all that wonderful either.<\/p>\n<p>\u6709\u4e9b\u7a0b\u5e8f\u8ba4\u4e3a\u7528\u6237\u754c\u9762\u6c38\u8fdc\u4e0d\u4f1a\u6539\u53d8\u7684\u3001\u975e\u5e38\u5e38\u89c1\u7684\u4e00\u79cd\u8868\u73b0\uff0c\u4fbf\u662f\u6df1\u5165\u5230\u7cfb\u7edf\u6587\u4ef6\u4e2d\u968f\u4fbf\u6252\u62c9\u6ca1\u6709\u5728\u6587\u6863\u4e2d\u63cf\u8ff0\u7684\u8d44\u6e90\u3002\u5728 Shell \u8bbe\u8ba1\u4e2d\uff0c\u6211\u4eec\u9677\u5165\u4e86\u4e00\u79cd\u4e0d\u60c5\u613f\u7684\u5883\u5730\uff0c\u5373\u4fdd\u7559\u67d0\u4e9b\u5df2\u7ecf\u300e\u6b7b\u6389\u300f\u7684\u56fe\u6807\uff0c\u6765\u8ba9\u8fd9\u7c7b\u8ba4\u4e3a\u67d0\u4e9b\u8d44\u6e90\u4f1a\u4e00\u76f4\u5b58\u5728\u7684\u7a0b\u5e8f\u9ad8\u5174\u3002\u4e0d\u8fc7\uff0c\u6211\u4eec\u901a\u5e38\u90fd\u4f1a\u5c06\u8fd9\u4e9b\u300e\u9057\u5b64\u300f\u56fe\u6807\u53d8\u6210\u7a7a\u767d\uff0c\u4f7f\u5f97\u8fd9\u4e9b\u7a0b\u5e8f\u867d\u7136\u4e0d\u4f1a\u5d29\u6e83\uff0c\u4f46\u4e5f\u4e0d\u4f1a\u8ba9\u5b83\u4eec\u770b\u4e0a\u53bb\u518d\u90a3\u4e48\u5b8c\u7f8e\u3002<\/p>\n<p>Recently, I learned of a new type of resource stealing: Stealing animations. For Windows Vista, there have been many changes to the way the system internally organizes its resources in order to support the Multilingual User Interface feature. One of the things we found was a handful of programs that reach directly into Shell32.dll in order to obtain the file copy animation. Too bad (1) the animation isn\u2019t kept there any more, and even if we moved the animation back to its original location, (2) the animation uses a new compression scheme that older programs can\u2019t handle.<\/p>\n<p>\u6700\u8fd1\uff0c\u6211\u53c8\u4e86\u89e3\u4e86\u4e00\u79cd\u7a83\u53d6\u8d44\u6e90\u7684\u65b0\u65b9\u6cd5\uff1a\u76d7\u7528\u52a8\u753b\u3002\u5728 Windows Vista \u4e2d\uff0c\u4e3a\u4e86\u652f\u6301\u591a\u8bed\u8a00\u7528\u6237\u754c\u9762\uff08MUI\uff09\u529f\u80fd\uff0c\u5728\u7cfb\u7edf\u5185\u90e8\u5bf9\u8d44\u6e90\u7684\u6392\u5e8f\u6574\u7406\u65b9\u5f0f\u53d1\u751f\u4e86\u5f88\u5927\u7684\u53d8\u5316\u3002\uff08\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\uff09\u6211\u4eec\u53d1\u73b0\u4e86\u4e00\u4ef6\u4e8b\uff0c\u6709\u4e0d\u5c11\u5e94\u7528\u7a0b\u5e8f\u76f4\u63a5\u8dd1\u8fdb SHELL32.DLL \u4e2d\u76f4\u63a5\u5c06\u590d\u5236\u6587\u4ef6\u7684\u52a8\u753b\u62ff\u6765\u7528\u3002\u53ef\u60dc\u7684\u662f\uff0c\uff081\uff09\u8fd9\u4e2a\u52a8\u753b\u5df2\u7ecf\u4e0d\u5728\u539f\u5148\u7684\u4f4d\u7f6e\u4e86\uff0c\u5e76\u4e14\u5c31\u7b97\u6211\u4eec\u5c06\u8fd9\u4e2a\u52a8\u753b\u653e\u56de\u539f\u6765\u7684\u4f4d\u7f6e\uff0c\uff082\uff09\u8fd9\u4e2a\u52a8\u753b\u6240\u4f7f\u7528\u7684\u65b0\u7684\u538b\u7f29\u65b9\u5f0f\uff0c\u8fd9\u4e9b\u8001\u7248\u672c\u7684\u7a0b\u5e8f\u4e5f\u4e0d\u652f\u6301\u3002<\/p>\n<p>Remember, resources in system DLLs should be treated as implementation details, unless explicitly documented otherwise.<\/p>\n<p>\u8bf7\u8bb0\u4f4f\uff0c\u9664\u975e\u5728\u6587\u6863\u4e2d\u660e\u793a\uff0c\u5426\u5219\u7cfb\u7edf DLL \u4e2d\u7684\u8d44\u6e90\u5e94\u5f53\u88ab\u89c6\u4e3a\u5b9e\u65bd\u7ec6\u8282\u3002<\/p>\n<p>I\u2019m not sure what we\u2019re going to do about the animation resource problem. Suggestions anyone? Should we declare these programs broken and make the people who bought them go back to their vendors for upgrades? (What if there is no vendor?) Should we develop a shim and hope that those four are the only programs that need it? Should we carry the original animation in shell32.dll as junk? If I told you that one of the programs that did this won \u201cGame of the Year\u201d recently, would that change your answer? What if another turned out to be a top-rated anti-spyware program?<\/p>\n<p>\u6211\u4e0d\u662f\u5f88\u786e\u5b9a\u5e94\u8be5\u600e\u4e48\u89e3\u51b3\u8fd9\u4e2a\u76d7\u7528\u7cfb\u7edf\u52a8\u753b\u7684\u95ee\u9898\uff0c\u6709\u4eba\u80fd\u7ed9\u4e2a\u5efa\u8bae\u5417\uff1f\u662f\u4e0d\u662f\u5e94\u8be5\u8ba9\u8fd9\u4e9b\u7a0b\u5e8f\u65e0\u6cd5\u8fd0\u884c\uff0c\u8ba9\u8d2d\u4e70\u4e86\u8fd9\u4e9b\u8f6f\u4ef6\u7684\u4eba\u4eec\u56de\u53bb\u627e\u53d1\u884c\u5546\u8fdb\u884c\u5347\u7ea7\u5462\uff08\u8981\u662f\u6ca1\u6709\u53d1\u884c\u5546\u8be5\u600e\u4e48\u529e\uff09\uff1f\u8fd8\u662f\u5e94\u8be5\u9488\u5bf9\u8fd9\u4e9b\u7a0b\u5e8f\u6253\u4e2a\u8865\u4e01\uff0c\u7136\u540e\u5bc4\u5e0c\u671b\u4e8e\u53ea\u6709\u8fd9\u4e9b\u7a0b\u5e8f\u9700\u8981\u8fd9\u4e2a\u8865\u4e01\u5417\uff1f\u6216\u8005\u8ba9\u65e7\u7248\u672c\u7684\u52a8\u753b\u7ee7\u7eed\u5b58\u5728\u4e8e SHELL32.DLL \u4e2d\u4f5c\u4e3a\u6b8b\u7559\u5462\uff1f\u5982\u679c\u6211\u544a\u8bc9\u4f60\u6709\u8fd9\u4e2a\u95ee\u9898\u7684\u8f6f\u4ef6\u6700\u8fd1\u8fd8\u62ff\u4e86\u300e\u5e74\u5ea6\u6700\u4f73\u6e38\u620f\u300f\u7684\u5956\u9879\uff0c\u4f60\u4f1a\u9009\u62e9\u4fee\u6539\u4f60\u7684\u56de\u7b54\u5417\uff1f\u8981\u662f\u6211\u544a\u8bc9\u4f60\u8fd8\u6709\u4e00\u6b3e\u5b58\u5728\u8fd9\u4e2a\u95ee\u9898\u7684\u8f6f\u4ef6\uff0c\u662f\u67d0\u4e2a\u540d\u5217\u524d\u8305\u7684\u53cd\u95f4\u8c0d\u8f6f\u4ef6\u5462\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/devblogs.microsoft.com\/oldnewthing\/2005102 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3204","post","type-post","status-publish","format-standard","hentry","category-tont_history"],"_links":{"self":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3204","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/comments?post=3204"}],"version-history":[{"count":0,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/posts\/3204\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/media?parent=3204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/categories?post=3204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aoisnow.net\/blog\/wp-json\/wp\/v2\/tags?post=3204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}