ªþ¿ý¥|¡@Windows XP µøı­·®æ

¥Á°ê¤E¤Q¦~¤K¤ë·L³nµo¦æªº Windows XP °£¤F§ïµ½ Windows 9x/Me ¨t¦C®e©ö·í¾÷ªº¯ÊÂI¤§¥~¡A¥¦ªºµe­±¤]Åý·í®É³\¦h¤H¬°¤§ÅåÆA¡A³o¦³¤@¤j³¡¤ÀÂk¥\©ó¡yµøı­·®æ¡z(Visual Style)¡C½Ñ¦pµøµ¡¼ÐÃDÄ檺¨â­Ó¨¤¸¨Åܦ¨¶ê©·§Î¡B·í¨Ï¥ÎªÌ§â·Æ¹«´å¼Ð²¾¨ì«ö¶s¤W®É«ö¶s·|²¤·L§ïÅÜ¡Kµ¥µ¥®ÄªG¡A³£¬O XP ªºµøı­·®æ©Ò­P¡A³o¨Çµøı­·®æ¤£¶·¯S§O¦w¸Ë³nÅé¡A¥u­n XP ¨t²Î¦w¸Ë§¹¦¨«á¡A´N¯à¨É¨üµøı­·®æ±a¨Óªº¦n³B¡CWindows XP ªº±µ¯Z¤H¡AVista ¥H¤Î Windows 7¡A¤]ªu¥Îµøı­·®æ¡C¦b Windows XP ùØ¡A¦pªG±z¤£²ßºD¡A¤]¥i¥H¦b§â·Æ¹«´å¼Ð²¾¨ì®à­±¤W¥ô¦ó¤@³B¡A«ö¤U·Æ¹«¥kÁä¡A¦b¼u¥X¿ï³æ¤¤¿ï«ö¡y¤º®e¡z·|¥X²{¤U¹Ïªº¹ï¸Ü²°¡A¦b¡y¥DÃD¡z­¶­±ªº½Æ¦X®Ø¥i¥H¿ï¾Ü¡yWindows ¶Ç²Î°t¦â¡z«ì´_¦¨»P­ì¨Ó Windows 9x/Me ¬Û¦Pªº®à­±¡A³o®É XP ´N¤£±Ò°Êµøı­·®æ¡A®à­±¬Ý°_¨Ó´NÁàÁ઺¤F¡C( ¦pªG±z¨Ï¥Î Windows 7 §@·~¨t²Î¡A¤]¥i¥H¦b®à­±¤W¥ô¦ó¤@³B¡A«ö·Æ¹«¥kÁä¡A¿ï¾Ü¡y­Ó¤H¤Æ¡z¡AµM«á¿ï¾Ü¡yWindows ¶Ç²Î°t¦â¡z¡A´N·|Åܦ¨»P Windows 9x/Me ¤@¼Ëªº§G´º¤F¡C)


Windows XP ¤Î¨ä«áªº§@·~¨t²Î¬O³z¹L uxtheme.dll »P²Ä¤»ª©ªº comctl32.dll ¨â­Ó°ÊºA³sµ²µ{¦¡®w¹F¨ì¥þ·sªºµøı­·®æ¡A«eªÌ¬O³B²z¦³Ãö§G´º¥DÃDªºµ{¦¡®w¡F¦Ó«áªÌ«h¬O³B²z±±¨î¶µªºµ{¦¡®w¡C¤£¹L¦b³o¤@³¹ùØ¡A¤p¤ì°¸¶È¶È°Q½×±±¨î¶µªº·sµøı­·®æ¡A¦]¦¹¤£¹ï uxtheme.dll ¦h°µ´y­z¡C§Ú­Ì¥ý¨Ó¬Ý¬Ý¨ã¦³ Windows XP µøı­·®æªº«ö¶s¦³¤°»ò®t²§¡H©³¤Uªº¥|­Óµøµ¡³£¬O²Ä¤@³¹ªº message ¦b Windows XP ¤Î Windows 7 ¤¤°õ¦æ®Éªº±¡§Î¡A¥ªÃ䪺¨â­Óµøµ¡¡A¨ä«ö¶s¨ã¦³ Windows XP µøı­·®æ¡A¥kÃä¨â­Óµøµ¡ªº«ö¶s¤£¨ã Windows XP µøı­·®æ¡F¤W­±ªº¨â­Óµøµ¡¬O¦b Windows XP ¤¤°õ¦æªºµ²ªG¡A¤U­±ªº¨â­Óµøµ¡¬O¦b Windows 7 ùØ°õ¦æªºµ²ªG¡G
¡@ ¡@
¡@ ¡@

¦b Windows 9x/Me §@·~¨t²ÎùØ¡A±±¨î¶µ¤À¦¨¨Ï¥ÎªÌ±±¨î¶µ»P³q¥Î±±¨î¶µ¡A«eªÌ¥Ñ user.dll ­t³d³B²z¡A«áªÌ«h¬O³z¹L 5.x ª©ªº comctl32.dll ³B²z¡C¦b Windows XP ¤Î¨ä¥H«áªº§@·~¨t²Î¡A¦b¹w³]ªº±¡§Î¤U ( ¤]´N¬O¤@¦w¸Ë¦n )¡A¨t²Î¦Û°Ê¶}±Ò·sªºµøı­·®æ¡C«D¤u§@°Ï³¡¤À³£¦Û°Ê¥H·sªºµøı­·®æÅã¥Ü¡F¦Ó¤u§@°Ï³¡¤À«h¥i¦Û¥Ñªº¿ï¾Ü±±¨î¶µ¬O§_¨ã¦³ XP µøı­·®æ¡A³o¬O·L³n¬°¤FÅýµ{¦¡¤]¯à¦b XP ¤W°õ¦æ¡C¬°¤F¹F¨ì³o­Ó¥Øªº¡AXP ªº«D¤u§@°Ï§ï¥Ñ uxtheme.dll ³B²z¡F¤u§@°Ï³¡¤À«h¬O¸û¬°½ÆÂø¡CWindows XP ´£¨Ñ¤F¨â®Mªº comctl32.dll¡A¨äª©¥»¤À§O¬O²Ä¤­ª©»P²Ä¤»ª©¡A«eªÌ¦b ¡y\WINDOWS\system32\¡z¤l¥Ø¿ý¡A±Mªù­t³d³B²z¤£¨ãµøı­·®æªº³q¥Î±±¨î¶µ¡F«áªÌ¦b¡y\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_XXXXXXXX\¡z¤l¥Ø¿ý¡A­t³d³B²z¨ã¦³·sªºµøı­·®æªº¨Ï¥ÎªÌ±±¨î¶µ»P³q¥Î±±¨î¶µ¡F¦Ó¤£¨ãµøı­·®æªº¨Ï¥ÎªÌ±±¨î¶µ¤´¥Ñuser32.dll ³B²z¡C¥Ñ¤W­±»¡©ú¥iª¾¡A¦b¹w³]ªº±¡§Î¤U¡A«D¤u§@°Ï¦Û°Ê´N·|¨ã¦³·sµøı­·®æ¡F¦Ó¦b¤u§@°Ïªº±±¨î¶µ¨É¨ü¤£¨ì³o¼Ëªº¦n³B¡A°£«D§Ú­Ì¦bµ{¦¡¤¤¯S§O«ü¥Ü¡C

ªþ±a¤@´£¡A¹³ Windows XP ³o¼ËÅý¨â­ÓÀɦW¬Û¦P¦ýª©¥»¡B¤º®e¤£¦Pªº dll ©Î¨ä¥LÃþ«¬ªºÀɮצ@¦P¦s©ó¦P¤@­Ó¨t²Îùتº§Þ³NºÙ¬°¡ySide-by-side Assembly Sharing¡z¡C³oùتº Assembly ¤£¬O²Õ¦X»y¨¥ªº·N«ä¡A¦Ó¬O²Õ¥ó¡B¤¸¥óªº·N«ä¡C

¨¥Âk¥¿¶Ç¡A­è¤~»¡ Windows XP ¥]§t¤F²Ä¤­ª©©M²Ä¤»ª©ªº comctl32.dll¡C¦b¹w³]ªº±¡§Î¤U¡A¨Ï¥ÎªÌ±±¨î¶µ¬O¸g¥Ñ user32.dll ³B²z¡A³q¥Î±±¨î¶µ¤~³z¹L²Ä¤­ª©ªº comctl32.dll ³B²z¡A³o®É­Ôªº±±¨î¶µ¬O¤£¨ãµøı­·®æ¡A»P¥H«eªº Windows 9x/Me ¤@¼Ë¡A¥H¹F¦^·¹¬Û®eªº¥Øªº¡C¦pªGµ{¦¡­n¨Ï¥Î·sªºµøı­·®æ¡A¥²¶·©I¥s²Ä¤»ª©ªº comctl32.dll¡A³o®É­Ô¤£ºÞ¬O¨Ï¥ÎªÌ±±¨î¶µ¡AÁÙ¬O³q¥Î±±¨î¶µ³£¥Ñ²Ä¤»ª©ªº comctl32.dll ­t³d³B²z¡C­nÀ³¥Îµ{¦¡©I¥s²Ä¤»ª©ªº comctl32.dll ¥²¶·¥ý«Ø¥ß¤@­ÓºÙ¬°¡yÀ³¥Îµ{¦¡¸ê°T²M³æ ( application manifest )¡zªºÀɮסA³o­ÓÀÉ®×¥]§t¤F¤@¨Çª©¥»¸ê®Æ¡A©Ò¥H¯à«ü©w­n¸ü¤J­þ¤@ºØª©¥»ªº comctl32.dll¡C¦³¨âºØ¤è¦¡¨Ï¥Î³o­ÓÀɮסG

  1. ²Ä¤@ºØ¤è¦¡¬O§â³o­ÓÀɮשñ¦b»P°õ¦æÀɬۦP¤l¥Ø¿ý¨Ã¨Ï¥DÀɦW»P°õ¦æÀɬۦP¡A°ÆÀɦW¬°¡y.manifest¡z¡A§Y¥iÀò±o·sªºµøı¨É¨ü¦Ó¤£¥²­«·s²ÕĶ¡C
  2. ²Ä¤GºØ¤è¦¡¬O§â application manifest ÀÉ¥[¤J¸ê·½´y­zÀɤ¤¡A¦A­«·s²ÕĶ³sµ²¦¨·sªº¥i°õ¦æÀÉ¡C

¤£ºÞ¬O§_­n­«·s²ÕĶ³sµ²¡A³£±o¥ý·Ç³Æ¦n°ÆÀɦW¬°¡y.manifest¡zªº¡yÀ³¥Îµ{¦¡¸ê°T²M³æ¡zÀɮסA©³¤U¤p¤ì°¸´N¨Ó¤¶²Ð manifest ÀÉ¡C


À³¥Îµ{¦¡¸ê°T²M³æÀÉ®× ( Manifest ÀÉ )

§Ú­Ìª¾¹D¡AÀ³¥Îµ{¦¡¤@¯ë³£·|©I¥s°ÊºA³sµ²µ{¦¡®w ( Dynamic-Link Library¡A´N¬O DLL ÀÉ°Õ )¡A³o¨Ç°ÊºA³sµ²µ{¦¡®w³£¬O¦@¨Éªº¡C©Ò¿×¦@¨É¡A´N¬O»¡¦pªG¦w¸Ë¬YÀ³¥Îµ{¦¡®É¡Aµo²{¸Óµ{¦¡©Ò»Ýªº DLL Àɤw¸g¦w¸Ë¦b¨t²Î¤W¤F¡A¸Óµ{¦¡´N¤£»Ý¦A¦w¸Ë³o­Ó DLL ÀɤF¡Aª½±µ¨Ï¥Î´N¥i¥H¤F¡C¦pªG¸ÓÀ³¥Îµ{¦¡©Ò»Ý­nªº DLL Àɤñ¨t²Î¤W²{¦³ªº DLL Àɪ©¥»§ó°ªªº¸Ü¡A©ó¬O¸ÓÀ³¥Îµ{¦¡ªº¦w¸Ëµ{¦¡´N·|¥H¸û°ªª©¥»ªº DLL ÀÉ¥N´Àª©¥»¡C¨Æ¹ê¤W¡A·L³n¦b¤@¨Ç Service Pack ¤]±`§ó´« DLL ÀÉ¡F¥t¤@­Ó¨Ò¤l¬O¦pªG±z¨Ï¥Î XP ¥B´¿¦w¸Ë¹L OllyDebug 1.10 ª©¡A¥¦¤]·|´£¿ô¡y¨t²Î¤Wªº PSAPI.DLL ¤ñ OllyDebug ¦Û¦æÄâ±aªºÁÙ·s¡z¡A©ó¬O°Ý±z­n¨Ï¥Î¨t²Î¤WªºÁÙ¬O OllyDebug 1.10 ¦Û¦æÄâ±aªº¡H

©Ò¥H¡A¨t²Î¤¤ªº DLL ®É±`¦b¤£ª¾¤£Ä±¤¤´N³Q´À´«¡A°²¦p·sª©ªº DLL »Pª©¤£¬Û®e¡A¦Ó¥B¨t²Î¤¤¥u¯à¦³¤@­Óª©¥»ªº¸Ü¡A¨º»ò´N¦³¥i¯à·|µo¥Í­ì¥»°õ¦æ±o«Ü¦nªºµ{¦¡¡A¦b¦w¸Ë¬Y¨Ç³nÅé«áµLªk°õ¦æ©Î¬O·í±¼¡C³o´N¬O¦³¦Wªº DLL Hell¡C¬°¤F¬YºØµ{«×¤W¸Ñ¨M³o­Ó°ÝÃD¡A·L³n´£¨Ñ¤F¨âºØ¤èªk¡GIsolated Applications ©M Side-by-Side Assembly Sharing¡C

Isolated Application ´N¬OÀ³¥Îµ{¦¡¦bµo¦æ®É¡A´N¤wÄâ±a¤F¸Óµ{¦¡©Ò¦³ DLL ªº¹jÂ÷ª©¥» ( Isolated Version )¡A³o¼Ë´N¤£·|¨ü¨ä¥Lµ{¦¡¼vÅT¤F¡C¦ý¬O¥²¶·­«¼g­ì©l½X¡A¥N»ù¤Ó°ª¡C Side-by-Side Assembly Sharing ¥i¥HÅý·sª©¥»ªº DLL ¦@¦s©ó¦P¤@¨t²Î¤¤¡CWindows XP ¤¤ªº³\¦h¦@¨É DLL ´N¬O¥H Side-by-Side ªº¤è¦¡¨Ó½s¼gªº¡Cµ{¦¡³]­p®v¥i¥H¼¶¼g¡yÀ³¥Îµ{¦¡¸ê°T²M³æ¡z¨Ó¹F¨ì Side-by-Side Assembly Sharing ªº¦n³B¡CÀ³¥Îµ{¦¡¸ê°T²M³æ¤º´y­z¤Fµ{¦¡©Ò©I¥sªº DLL ª©¥»¸ê°T¡A©Ò¥H§@·~¨t²Î¥i¥H®Ú¾Ú³o¨Ç¸ê®Æ¥¿½Tªº¦w¸Ë¦@¨É¸ê·½¡C¨Ò¦pÀ³¥Îµ{¦¡·|©I¥s²Ä¤­ª©ªº COMCTL32.DLL¡A¨Ã¦bÀ³¥Îµ{¦¡¸ê°T²M³æùØ«ü©ú¤F²Ä¤­ª©ªº COMCTL32.DLL ¡A§Y¨Ï¨t²Î¤W¦³§Oªºª©¥»¡A§@·~¨t²Î¤]¤´±N¬°¸Óµ{¦¡¸ü¤J²Ä¤­ª©ªº COMCTL32.DLL¡C

¡yÀ³¥Îµ{¦¡¸ê°T²M³æ¡zªº»yªk¬O¥H XML ®æ¦¡®Ñ¼g¡A¦Ó XML Àɮ׳£¬O¯Â¤å¦rÀÉ¡A¥ç§Y±z¥i¥H¨Ï¥Î¡y°O¨Æ¥»¡z©Î¡yUltraEdit 32¡z³oºØ¤å®Ñ³B²z³nÅé«Ø¥ß¡CXML ªº²Ä¤@¦æ¤@©w¬O«Å§i³o¬O¤@¥÷ XML ÀɮסA¤º®e¦p¤U¡G

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

´N¦p¦P HTML Àɮפ@¶}©l·|¦³

<html>

¤@¼Ë¡A¤£¹L HTML Àɦbµ²§ô®É¡AÁÙ·|¦³¤@­Ó </html> ªí¥ÜÀɮר즹µ²§ô¡A¦Ó XML ªº«Å§i«h¤£¥²¦³ </xml?>¡C±z¥i¥H°Ñ¦Ò¡y³Òªê¡z©M¡y¯Ú¯×ªê¡z¦@¦P¼¶¼gªº¡yµL¼o¸Ü XML¡zùØ­±¬O¤¶²Ð XML ªºÆ[©À¡A¬O¤@½g XML ¤Jªùªº¦n¤å³¹¡C¦¹³B¤p¤ì°¸¶È´N²{¦b¥Î¨ìªº³¡¥÷»¡©ú¡C<?xml version="1.0" encoding="UTF-8" standalone="yes"?> ¤¤¦³¤T³¡¥÷¡A²Ä¤@­Ó¬O¡yversion="1.0"¡z¡A«Ü©úÅã¬O³o«Å§i XML ª©¥»¡F²Ä¤G­Ó³¡¥÷¬O¡yencoding="UTF-8"¡z¡AÅãµM¬O«ü©w½s½X¤è¦¡¡F²Ä¤T­Ó³¡¥÷¬O¡ystandalone="yes"¡z¬O«ü¦¹¥÷ XML ªº DTD Àɮ׬O¨Ï¥Î¸ÑªR¾¹¹w³]ªº¡A¸Ô²Ó±¡§Î½Ð°Ñ¾\¡yµL¼o¸Ü XML¡z¡C¤£¹L¹ï§Ú­Ì²{¦b­n¨ÏÀ³¥Îµ{¦¡¨ã¦³µøı­·®æ¦Ó¨¥¡AManifest Àɪº²Ä¤@¦æ³£¬O¹³¤W­±³o¼Ë¡A±z¥iµø¬°©T©w¤£Åܪº¡C©³¤U§Ú­Ì¥ý¬Ý¬Ý¾ã­Ó Manifest Àɪºªø¬Û¡G

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity
        version="1.0.0.0"
        processorArchitecture="X86"
        name="pinocchio.assembly.win32.message1"
        type="win32"
    />
    <description>Test application for xp style.</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="X86"
                publicKeyToken="6595b64144ccf1df"
                language="*"
            />
        </dependentAssembly>
    </dependency>
</assembly>

¤j­P¤W¡AXML ªº¼ÐÅҮ榡¦p¤U¹Ï¡G
¡@¡@¡@¡@
XML ©M HTML ªº¼ÐÅÒ«ÜÃþ¦ü¡A³£¥H¤@¹ï¡§<¡¨¡B¡§>¡¨¥]¦í¡A¨C­Ó¼ÐÅÒºÙ¬°¡y¤¸¯À¡z¡A¥]§t¡y¤¸¯À¦W¡z©M¡yÄݩʦW¡z¡A¦¹¥~¦³¨Ç¤¸¯À¹³¤@­Ó®e¾¹¡A¥H¥t¤@­Ó¡§</¡K¡K>§@¬°µ²§ô¡A¦b³o¤§¶¡ªºªÅ¶¡¡A¥i¥H¥]§t¤@¨Ç¤å¦r¡A¤]¥i¥H¨S¦³¥ô¦ó¤º®e¡A¤]¥i¥H¬O¬Y¨Ç¡y¤l¤¸¯À¡z¡C¹³¤W­±

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
¡K¡K
</assembly>

¤§¶¡¡A®e¯Ç¤F³\¦h¡y¤l¤¸¯À¡z¡A³Ì«á¤~¥H¤@­Ó¡§</assembly>¡¨¬°µ²§ô¡C¤@¯ë¦Ó¨¥¡A¦b XML ùØ­±ªº¤¸¯À¡A³£À³¸Ó­n¹³³o¼Ë¥H¤@¹ï¡§<¤¸¯À¦W>¡¨¡B¡§</¤¸¯À¦W>¡¨¤~ºâ§¹¾ã¡F¦ý¤]¦³¤£»Ýµ²§À¼ÐÅÒªº¤¸¯À¡A¹³³o¼Ëªº¤¸¯ÀºÙ¬°¡yªÅ¤¸¯À¡z( empty element )¡A¨Ò¦p assemblyIdentity ´N¬OªÅ¤¸¯À¡A¥¦­Ì¦b³Ì«á¤@­ÓÄÝ©Ê¥H¡y/>¡z·í¦¨µ²§À¡A¥¦­Ìªø±o¹³¤U­±¡G
¡@¡@¡@¡@

XML ÀÉ®×ùتº²Ä¤@­Ó¤¸¯À¡AºÙ¬°¡y®Ú¤¸¯À¡z( root element )¡A¦b¡yÀ³¥Îµ{¦¡¸ê°T²M³æ¡zªº®Ú¤¸¯À¬O assembly¡A¦¹³Bªº assembly ¨Ã«D²Õ¦X»y¨¥ªº·N«ä¡A¦Ó¬O²Õ¥ó¡B¤¸¥óªº·N«ä¡A©Î³\§Ú­Ì¥i¥H·Q¹³¦¨À³¥Îµ{¦¡¬O¥Ñ¹Ï¥Ü¡B¿ï³æ¡B°Æµ{¦¡µ¥³\¦hªº²Õ¥ó©Ò²Õ¦¨¡Aassembly ¦³¨â­ÓÄݩʦWºÙ¡Axmlns ©M manifestVersion¡A¤À§O¥Nªí©R¦WªÅ¶¡ ( name space ) ©Mª©¥»¡A³o¨â­ÓÄݩʤ]³£µLªk¬Ù²¤¡A¤]³£«ö·Ó¤W­±ªºÄÝ©Ê­È¡A¤£¶·§ó§ï¡C

assembly ¥i¥H¥]§t noInherit¡BassemblyIdentity¡Bdependency¡Bfile ³\¦h¤l¤¸¯À¡A¨ä¤¤ noInherit ©M file ¥i¥H¬Ù²¤¡A½Ð°Ñ¦Ò¤Uªí¡G

¤¸¯À¥i¥H¦³ªºÄÝ©Ê·N¸q
<noInherit>µL noInherit ¥²¶·¬O assembly ¤¸¯Àªº²Ä¤@­Ó¡y¤l¤¸¯À¡z¡A¨ä«á¥²©w±µ assemblyIdentity ¤l¤¸¯À¡CnoInherit ¥i¥H¬Ù²¤¡A¦pªG¬Ù²¤ªº¸Ü¡AassemblyIdentity ´NÅܦ¨²Ä¤@­Ó assembly ªº¡y¤l¤¸¯À¡z¤F¡C
<assemblyIdentity>typeªí©úÀ³¥Îµ{¦¡©Î²Õ¥ó¦b­þ¤@¨t²Î¤¤°õ¦æ¡A¥²¶·¬O¤p¼gªº¡ywin32¡z¡C¤£¯à¬Ù²¤¡C
nameÀ³¥Îµ{¦¡©Î²Õ¥ó¦WºÙ¡A¥²¶·¬O°ß¤@ªº¥B¤£¯à¬Ù²¤¡C¥²¶·¬O¥H¡y²Õ´¦WºÙ.³¡ªù¦WºÙ.µ{¦¡¦WºÙ¡zªº¤è¦¡©R¦W¡C
languageÀ³¥Îµ{¦¡©Î²Õ¥ó©Ò¨Ï¥Îªº»y¨t¡A¥i¬Ù²¤¡A¨ä«ü©w¤è¦¡¬O¨Ì·Ó HTML ¤è¦¡«ü©w»y¨t¡A¦pªG¬O»OÆW¥¿Å餤¤å¬O zh-tw¡B¤j³°Â²Å餤¤å¬O zh-cn¡B¬ü°ê­^¤å¬O en-us¡C¦pªG¬O¦h»y¨tªºÀ³¥Îµ{¦¡¡AÀ³¸Ó¬Ù²¤«ü©w³o­ÓÄÝ©Ê¡Fµo®i¦¨¦h»y¨tªº²Õ¥ó¡AÀ³¸Ó«ü©w¦¨¡y*¡z¡C
processorArchitecture«ü©w CPU¡A¦pªG¬O Win32 À³¥Îµ{¦¡¡AÀ³¨Ï¥Î¡yx86¡z¡F¦pªG¬O Win64 À³¥Îµ{¦¡¡A¨Ï¥Î¡yIA64¡z¡F¦pªG¬O¨ä¥L¥­¥x¡A¥i¥H¬Ù²¤¡C
versionÀ³¥Îµ{¦¡©Î²Õ¥óªºª©¥»¡A¤£¥i¬Ù²¤¡AÀ³¨Ï¥Î¡y¥D­nª©¥».¦¸­nª©¥».«Ø¸mª©¥».­×¥¿ª©¥» ( major.minor.build.revision ) ®æ¦¡¥|³¡¥÷²Õ¦¨¡A¨C¤@³¡¥÷ªº¼Æ­È¥i¥H±q 0¡ã65535¡C
publicKeyToken¤Q¤»¦ì¼Æ­È¡A¥H¤Q¤»¶i¦ìªí¥Ü¡CSide-by-side Assembly ªº¦@¥Î¤¸¥ó¤~»Ý­n«ü©w³o­ÓÄÝ©Ê¡A¦b¥»³¹ùس£¬O¥Î¡y6595b64144ccf1df¡z¡C
<dependency>µL <dependency> ¨S¦³ÄÝ©Ê¡A¥i¬Ù²¤¡F¦ý¦pªG¤£¬Ù²¤®É¡A¦Ü¤Ö­n¥]§t¤@­Ó <dependentAssembly> ¤l¤¸¯À¡C¦b <dependency> ¤º¥]§tªº¤l¤¸¯À©Ò´y­zªºÄÝ©Ê¡A´N¥Nªíµ{¦¡¬ÛÃöªº²Õ¥ó¡C
<dependentAssembly>µL <dependentAssembly> ¥²¶·¦b <dependency> ùØ¡A¥ç§Y <dependentAssembly> ¬O <dependency> ªº¤l¤¸¯À¡C<dependentAssembly> ªº²Ä¤@­Ó¤l¤¸¯À¥²¶·¬O <assemblyIdentity>¡C<dependentAssembly> ¨S¦³ÄÝ©Ê¡C
<file>name ÀɮצWºÙ¡A¨Ò¦p¡ycomctl32.dll¡z¡C
hashalg
hash

ºt¥Ü

¦b»¡¤F¤@¨Ç­I´ºª¾ÃѤ§«á¡A³Ì­«­nªº«K¬O¹ê§@¤F¡C¤p¤ì°¸¥´ºâ§â²Ä¤@³¹ªº¡y²Ä¤@­Ó Win32 ²Õ¦X»y¨¥µ{¦¡¡z¬°¨Ò¤l¡A»¡©ú¦p¦ó¹ê²{ XP µøı­·®æ¡C¨Ì¾Ú«e­±©Ò»¡ªº¡A¦³¨âºØ¤èªk¡G

²Ä¤@ºØ¡G¤£»Ý­«·s²ÕĶ

ÁöµM»¡¬O¤£»Ý­«·s²ÕĶ¡A¦ý¬O¦³­Ó±ø¥ó¡A¨º´N¬O¦pªG¦b­ì¨Óªºµ{¦¡¤¤¤w¸g©I¥s¹L InitCommonControls¡A¤~¥i¥H¤£¥²­«·s²ÕĶ¡C¦pªG¨S¦³©I¥s¹L InitCommonControls¡A´N±o¥[¤W³o¤@¦æ«ü¥O¡AµM«á­«·s²ÕĶ¡C¦p¤U¡G

message1.asm ­ì©l½X¡G

        OPTION  CASEMAP:NONE
        .386
        .MODEL  FLAT,STDCALL
INCLUDE         WINDOWS.INC
INCLUDE         KERNEL32.INC
INCLUDE         USER32.INC
INCLUDE         COMCTL32.INC
INCLUDELIB      KERNEL32.LIB 
INCLUDELIB      USER32.LIB
INCLUDELIB      COMCTL32.LIB

.DATA
szTitle BYTE    '²Ä¤@­Óµ{¦¡',0
szText  BYTE    '³o¬O¦b Win32 §@·~¨t²Î¡A¥Î²Õ¦X»y¨¥¼gªºµ{¦¡¡C',0

.CODE
Start:  INVOKE  InitCommonControls
        INVOKE  MessageBox,NULL,OFFSET szText,OFFSET szTitle,MB_OK
        INVOKE  ExitProcess,NULL
END     Start

InitCommonControls ¬Oªì©l¤Æ³q¥Î±±¨î¶µªº API¡A¦b¦­´Á°O¾ÐÅ餣¤jªº±¡§Î¤U¡A³q¥Î±±¨î¶µ¬O¤£¹w¥ý¸ü¤J°O¾ÐÅéùتº¡Aµ¥¨ì»Ý­n®É¤~¥H InitCommonControls ¸ü¤J¡F¦Ó InitCommonControls ¬O¥]§t¦b comctl32.dll ÀÉ®×ùØ¡A¦]¦¹¥²¶·¦A¥[¤W

INCLUDE         COMCTL32.INC
INCLUDELIB      COMCTL32.LIB

¨â¦æ¡C±µ¤U¨Ó«Ø¥ß message1 ªº¡yÀ³¥Îµ{¦¡¸ê°T²M³æÀɮסz¡A¤]´N¬O message1.exe.manifest Àɤº®e¦p¤U¡G

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
   <dependentAssembly>
      <assemblyIdentity type='win32' 
                        name='Microsoft.Windows.Common-Controls'
                        version='6.0.0.0'
                        processorArchitecture='*'
                        publicKeyToken='6595b64144ccf1df'
                        language='*'
      />
   </dependentAssembly>
</dependency>
</assembly>

¡yÀ³¥Îµ{¦¡¸ê°T²M³æÀɮסzªº©R¦W¬O¦³¤@©w®æ¦¡ªº¡A¡yÀ³¥Îµ{¦¡¸ê°T²M³æÀɮסzªº¥DÀɦW´N¬O°õ¦æÀɪº§¹¾ã¦WºÙ¡A¤]´N¬O°õ¦æÀɪº¥DÀɦW¥[¤W°ÆÀɦW¡F¦Ó¡yÀ³¥Îµ{¦¡¸ê°T²M³æÀɮסz°ÆÀɦW´N¬O¡y.manifest¡z¡C±µµÛ·Ó¤@¯ë¤èªk²ÕĶ¡G

E:\HomePage\SOURCE\Win32>ml message1.asm [Enter]
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

 Assembling: message1.asm
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/SUBSYSTEM:WINDOWS
"message1.obj"
"/OUT:message1.exe"

E:\HomePage\SOURCE\Win32>

³Ì«á§â°õ¦æÀÉ¡Amessage1.exe¡A©MÀ³¥Îµ{¦¡¸ê°T²M³æÀɮסAmessage1.exe.manifest¡A©ñ¦b¦P¤@¥Ø¿ýùØ¡A´N¤j¥\§i¦¨¤F¡C·íµM³oºØ¤èªk¥²¶·¨Ï°õ¦æÀÉ»PÀ³¥Îµ{¦¡¸ê°T²M³æÀɦb¤@°_¡A¤~¯àÅã¥Ü·sªºµøı­·®æ¡A³o¬O¤@¤j¯ÊÂI¡C

²Ä¤GºØ¤èªk¡G«Ø¥ß¸ê·½ÀÉ

³oºØ¤èªk¬O§âÀ³¥Îµ{¦¡¸ê°T²M³æ ( ¦¹À³¥Îµ{¦¡¸ê°T²M³æ©M¤W­±²Ä¤@ºØ¤èªkªº¤@¼Ë ) ¥[¤J¨ì¸ê·½ÀÉùØ¡A¦AÂǥѳsµ²¾¹¥[¤J°õ¦æÀÉùØ¡A©Ò¥H³Ì«á±o¨ìªº¥i°õ¦æÀɧY¨Ï¤£©MÀ³¥Îµ{¦¡¸ê°T²M³æÀɦb¤@°_¡A¤]¥i¥Hªí²{¥X XP µøı­·®æ¡C©³¤U¬O message1.rc Àɤº®e¬°¡G

#define RT_MANIFEST     24
1   RT_MANIFEST MOVEABLE PURE "message1.exe.manifest"

§â³o¤T­ÓÀɮצs¦b¦P¤@¤l¥Ø¿ý¡A¦b©R¥O´£¥Ü¦r¤¸¿é¤J¤U­±«ü¥O¡G

E:\HomePage\SOURCE\Win32\MessageBox>rc message1.rc [Enter]

E:\HomePage\SOURCE\Win32\MessageBox>ml message1.asm /link message1.res [Enter]
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997.  All rights reserved.

 Assembling: message1.asm
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/SUBSYSTEM:WINDOWS
"message1.obj"
"/OUT:message1.exe"
"message1.res"

E:\HomePage\SOURCE\Win32\MessageBox>