¥Á°ê¤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¥un 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)
¡@ | ¡@ |
¡@ | ¡@ |
¦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¥Ø¿ý¡At³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¡CnÀ³¥Îµ{¦¡©I¥s²Ä¤»ª©ªº comctl32.dll ¥²¶·¥ý«Ø¥ß¤@ÓºÙ¬°¡yÀ³¥Îµ{¦¡¸ê°T²M³æ ( application manifest )¡zªºÀɮסA³oÓÀÉ®×¥]§t¤F¤@¨Çª©¥»¸ê®Æ¡A©Ò¥H¯à«ü©wn¸ü¤Jþ¤@ºØª©¥»ªº comctl32.dll¡C¦³¨âºØ¤è¦¡¨Ï¥Î³oÓÀɮסG
¤£ºÞ¬O§_n«·s²ÕĶ³sµ²¡A³£±o¥ý·Ç³Æ¦n°ÆÀɦW¬°¡y.manifest¡zªº¡yÀ³¥Îµ{¦¡¸ê°T²M³æ¡zÀɮסA©³¤U¤p¤ì°¸´N¨Ó¤¶²Ð manifest ÀÉ¡C
§Ú̪¾¹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°Ý±zn¨Ï¥Î¨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³æ¤º´yz¤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¹ï§Ú̲{¦bn¨ÏÀ³¥Îµ{¦¡¨ã¦³µøı·®æ¦Ó¨¥¡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>
¤jP¤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¥Dnª©¥».¦¸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¤¸¯À©Ò´yzªºÄÝ©Ê¡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 |
¦b»¡¤F¤@¨ÇI´ºª¾ÃѤ§«á¡A³Ì«nªº«K¬O¹ê§@¤F¡C¤p¤ì°¸¥´ºâ§â²Ä¤@³¹ªº¡y²Ä¤@Ó Win32 ²Õ¦X»y¨¥µ{¦¡¡z¬°¨Ò¤l¡A»¡©ú¦p¦ó¹ê²{ XP µøı·®æ¡C¨Ì¾Ú«e±©Ò»¡ªº¡A¦³¨âºØ¤èªk¡G
Áöµ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
³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>