{"id":222,"date":"2007-04-05T21:29:47","date_gmt":"2007-04-05T19:29:47","guid":{"rendered":"https:\/\/alax.info\/blog\/222"},"modified":"2007-04-05T21:35:46","modified_gmt":"2007-04-05T19:35:46","slug":"reusable-avi-resources","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/222","title":{"rendered":"Reusable AVI Resources"},"content":{"rendered":"<p>While fixing Vista compatibility problems, an interesting issue arose with AVI clips. It is widely known that Windows shell animations are small AVI clips linked into shell32.dll binary as a resource of type &#8220;AVI&#8221;. Other DLLs have their clips too and standard <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/ms927251.aspx\">animation common control<\/a> is capable of picking the clips.<\/p>\n<p>It is quite convenient to reuse shell32.dll animations in an action progress UI:<\/p>\n<p><img decoding=\"async\" alt=\"image001.png\" id=\"image219\" src=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2007\/04\/image001.png\" \/><\/p>\n<p>However, it appeared that Vista&#8217;s shell32.dll comes with no more AVI clip at #170 resource in shell32.dll. So I needed a replacement and finally I made an application I have been needed since long ago: a batch grabber for AVI resources to see what AVIs come with clean OS.<\/p>\n<p><!--more-->The application takes binary file name (dll or exe) on the input and format for AVI clip file name to be exported (default is &#8220;$(ModuleName)-$(Name)-$(Language).avi&#8221;) and found AVIs are exported from the binary into separate files. A batch file with a command<\/p>\n<blockquote><p>for %%i in (%windir%\\system32\\*.dll) do ExportAviResources &#8220;%%i&#8221;<\/p><\/blockquote>\n<p>exports all AVIs from all DLLs lying in Windows system directory. There are nice ones there, it&#8217;s worth a look.<\/p>\n<blockquote><p>&#8230;<br \/>\nieakui-#201-0409.avi<br \/>\nieframe-#1-0409.avi<br \/>\nieframe-#2-0409.avi<br \/>\niepeers-#204-0409.avi<br \/>\nmsieftp-#257-0409.avi<br \/>\nNetProjW-#201-0409.avi<br \/>\nprintui-#430-0409.avi<br \/>\nprintui-#435-0409.avi<br \/>\nsetupapi-#61-0409.avi<br \/>\nshell32-#151-0409.avi<br \/>\nshell32-#160-0409.avi<br \/>\nshell32-#162-0409.avi<br \/>\nshell32-#164-0409.avi<br \/>\nshell32-#166-0409.avi<br \/>\nshell32-#168-0409.avi<br \/>\nsrchadmin-#1301-0409.avi<br \/>\nsyncui-#134-0409.avi<br \/>\nwiadefui-#1000-0409.avi<br \/>\n&#8230;<\/p><\/blockquote>\n<p>shell32-#166-0409.avi means that shell32.dll has an AVI resource number 166 in English language (0x0409).<\/p>\n<p>The easiest way to use this AVI in an animation control is (this assumes shell32.dll is already loaded into the process):<\/p>\n<blockquote><p>Animate_OpenEx(m_Animate, GetModuleHandle(_T(&#8220;shell32.dll&#8221;)), MAKEINTRESOURCE(166));<\/p><\/blockquote>\n<p>Partial (some header files are excluded, however the basic idea is clear) Visual C++.NET 2005 source code can be downloaded <a id=\"p113\" href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2007\/04\/exportaviresources.zip\">here<\/a>, compiled binary &#8211; <a href=\"https:\/\/alax.info\/blog\/wp-content\/uploads\/2007\/04\/exportaviresourcesexe.zip\">here<\/a>.<\/p>\n<p>See also: <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa511292.aspx\">Common Controls &#8211; New in Windows Vista\u00e2\u201e\u00a2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>While fixing Vista compatibility problems, an interesting issue arose with AVI clips. It is widely known that Windows shell animations are small AVI clips linked into shell32.dll binary as a resource of type &#8220;AVI&#8221;. Other DLLs have their clips too and standard animation common control is capable of picking the clips. It is quite convenient&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/222\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,2],"tags":[],"class_list":["post-222","post","type-post","status-publish","format-standard","hentry","category-seriously","category-utilities"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=222"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/222\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=222"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}