«e¤@³¹´£¹L¡AÁ`ºÞ·®æªº¹ï¸Ü²°¡A¥i¥H¨Ï¥Î OPENFILENAME µ²ºcÅ餤ªº lpTemplateName ¨Ó«ü©w¤@Ó¥]§tÃB¥~±±¨î¶µªº¤l¹ï¸Ü²°±ªO¡A¥H¼W¥[·s¥\¯à¡A¦ý¬O¨Ã¥¼´£¤Î¦p¦ó¹ê²{¡C¥»³¹±N±µÄò³oÓ¥DÃD¡A½Í½Í³o¤è±ªºì²z¡A¨ÃÁ|¨Ò¤l¹ê²{¥¦¡C
¥ý¤¶²Ð´XÓ Win64 API¡A¥¦Ì·|¦b¥»³¹ªº¨Ò¤l¥Î¨ì¡CµM«á¤¶²Ð¦p¦ó¼¶¼g¤l¹ï¸Ü²°±ªO¤Î¦³Ãö²Ó¸`¡C
GetParent ¥i¥H¬°¤lµøµ¡¨ú±o¨ä¤÷µøµ¡¤§µøµ¡¥N½X¡A¨ä쫬¦p¤U¡G
invoke GetParent,\
hWnd ; handle of child window
hWnd ¬°µøµ¡ªºµøµ¡¥N½X¡C¦pªG hWnd ¬°¤lµøµ¡¡A¦^¶ÇȬ° hWnd ªº¤÷µøµ¡¤§µøµ¡¥N½X¡F¦pªG hWnd ¬°³»¯Åµøµ¡¡]top-level windows¡^¥B¨ã¦³ WS_POPUP ·®æ¡A¦^¶ÇȬ°¾Ö¦³ªÌµøµ¡¤§µøµ¡¥N½X¡F¦pªG°õ¦æ¥¢±Ñ¡A¦^¶ÇȬ°¹s¡A¥i¥H©I¥s GetLastError ±o¨ì¶i¤@¨B»¡©ú¡C
ScreenToClient ·|§â«ü©w¹³¯Àªº¿Ã¹õ®y¼ÐÂà´«¬°¤u§@°Ï®y¼Ð¡C¿Ã¹õ®y¼Ð¬O¥H¿Ã¹õ³Ì¥ªÃä¡B³Ì¤W±ªº¹³¯À¬°ìÂI¡A¦Ó¤u§@°Ï®y¼Ð«h¬O¥Hµøµ¡ªº¥ª¤W¨¤¬°ìÂI¡C¤£½×¬O¿Ã¹õ®y¼ÐÁÙ¬O¤u§@°Ï®y¼Ð¡AìÂIªº®y¼Ð¬O (0,0)¡C¨CÓµøµ¡³£¦³¦Û¤vªº¤u§@°Ï®y¼Ð¡A©Ò¥H¨CÓµøµ¡¥ª¤W¨¤ªº¤u§@°Ï®y¼Ð³£¬O (0,0)¡C¦b¹w³]±¡§Î¤U¡A¤£½×¬O¿Ã¹õ®y¼Ð¡AÁÙ¬O¤u§@°Ï®y¼Ð¡A¥¦Ìªº X ®y¼Ð³£¬O¦bìÂI¥k¤è¬°¥¿¡A¶V©¹¥k¶V¤j¡FY ®y¼Ð¦bìÂI¤U¤è¬°¥¿¡A¶V©¹¤U¶V¤j¡CScreenToClient ªºì«¬¦p¤U¡G
invoke ScreenToClient,\ hWnd, ; window handle for source coordinates lpPoint ; address of structure containing coordinates
n©I¥s ScreenToClient Âà´«®y¼Ð¡A¶·¥H¬YÓµøµ¡ªº¤u§@°ÏìÂI¬°°ò·Ç§@¬°Âà´«¡A¦¹µøµ¡ªº¥N½X§Y¬° hWnd¡ClpPoint ¬° POINT µ²ºcÅé¦ì§}¡A³oµ²ºcÅ骺nÂà´«¦¨¤u§@°Ï®y¼Ðªº¿Ã¹õ®y¼Ð¡C¦pªG ScreenToClient °õ¦æ¦¨¥\¡A¦^¶ÇȬ°¤@¡A¥B lpPoint ¤ºªº®y¼Ð·|Åܦ¨Âà´««áªº¤u§@°Ï®y¼Ð¡F¦pªG°õ¦æ¥¢±Ñ¡A¦^¶ÇȬ°¹s¡C
À³¥Îµ{¦¡¥i¥H©I¥s SendMessage ¹ïµøµ¡µo°e WM_GETFONT °T®§¡A±o¨ì¸Óµøµ¡©Ò¨Ï¥Îªº¦r§Î¡C³o®É wParam¡BlParam §¡³]¬°¹s¡A¦p¤U±µ{¦¡¡G
invoke SendMessage,hWnd,WM_GETFONT,0,0
¨ä¤¤ªº hWnd ¬Oµøµ¡¥N½X¡C¦pªG°õ¦æ¦¨¥\¡A¦^¶ÇȬ° hWnd ©Ò¨Ï¥Î¦r§Î¥N½X¡F°²¦p¦^¶ÇȬ°¹s¡Aªí¥Ü hWnd ¨Ï¥Î¨t²Î¦r§Î¡C
À³¥Îµ{¦¡¤]¥i¥H©I¥s SendMessage¡Aµo°e WM_SETFONT °T®§¨ì¬YÓµøµ¡¡A³]©w¸Óµøµ¡n¥Îªº¦r§Î¡C³o®É wParam ¬°¦r§Î¥N½X¡ClParam ¥i¥H¬O¤@¡A¥Nªí¥ß§Y«Ã¸µøµ¡¡F¤]¥i¥H¬O¹s¡A¥Nªí¤£«Ã¸µøµ¡¡Cµ{¦¡¦p¤U¡G
invoke SendMessage,hWnd,WM_SETFONT,hFont,lParam
WM_SETFONT ¨S¦³¦^¶ÇÈ¡C³]©w±±¨î¶µ¦r§Î³Ì¦nªº®É¾÷¬O¦b³B²z WM_INITDIALOG °T®§®É¡A¦pªG¸Ó¦r§Î¤£¦A¨Ï¥Î®É¡AÀ³©I¥s DeleteObject ±N¨ä§R°£¡A¨Ò¦pºR·´±±¨î¶µ®É¡C
¦b¨t²Îø»s¹ï¸Ü²°¤§«e¡A¨t²Î·|§â WM_CTLCOLORDLG °T®§¶Ç°e¦Ü¹ï¸Ü²°¨ç¦¡¤¤¡CÂǥѳB²z¦¹°T®§¡A¥i¥H«ü©w¹ï¸Ü²°ªºI´ºÃC¦â¡C³o®ÉÔ wParam ¬O¹ï¸Ü²°ªº¸Ë¸m¤º®e¥N½X¡AlParam ¬O¹ï¸Ü²°¥N½X¡C·íµMÀ³¥Îµ{¦¡¥i¥H¨Ï¥Î³o¨Ç¸ê®Æ¡A¤]¥i¥H¤£¨Ï¥Î³o¨Ç¸ê®Æ¡A§¹¥þµøÀ³¥Îµ{¦¡ªº»Ý¨D¨Ó¨M©w¡C
·íÀ³¥Îµ{¦¡³B²z§¹ WM_CTLCOLORDLG °T®§¡A¨Ã¥Ñ¹ï¸Ü²°¨ç¦¡ªð¦^¨t²Î®É¡AÀ³±N¦b RAX ¤ºªº¦^¶Çȳ]©w¬°µe¨ê¥N½X¡A¨t²Î·|¥Î³oÓµe¨êø»s¹ï¸Ü²°I´ºÃC¦â¡C¨t²Î¤£·|¦Û°ÊºR·´µe¨ê¡A©Ò¥H·í¤£»Ýn®É¡AÀ³¥Îµ{¦¡¥²¶·t³dºR·´µe¨ê¡C
¦pªG¹ï¸Ü²°¨ç¦¡¤£³B²z WM_CTLCOLORDLG °T®§¡A¨t²Î·|¥Ñ DefWindowProc API ³B²z¦¹°T®§¡ADefWindowProc ·|¿ï¨ú¹ï¸Ü²°¹w³]ªº¨t²ÎÃC¦âø»s¹ï¸Ü²°I´º¡C
À³¥Îµ{¦¡¥i¥H¦b©I¥s GetOpenFileName ©Î GetSaveFileName ©Ò²£¥Íªº¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°¤¤¡A·s²K¥[¤@¨Ç±±¨î¶µ¡A¼W¥[³o¨â¹ï¸Ü²°ªº¥\¯à¡C
³o¨Ç·s¼Wªº±±¨î¶µ¡A¬O¦b¸ê·½´yzÀɤ¤ªº¹ï¸Ü²°±ªO¤¤©w¸q¡C©I¥s³o¨âÓ Win64 API «e¡A¦b OPENFILENAME µ²ºcÅ骺 Flags Äæ¦ì¤¤«ü©w OFN_ENABLETEMPLATE¡A¨Ã³]©w¦n hInstance ©M lpTemplateName Äæ¦ì¡C¦pªG¹ï¸Ü²°±ªO¤w¦s©ó°O¾ÐÅ餤¡A¤]¥i¥H³]¸m OFN_ENABLETEMPLATEHANDLE ºX¼Ð¡A¨Ã³]©w¦n hInstance¡C¤£½×þ¤@ºØ¡AÁÙn§â Flags ¥]§t OFN_EXPLORER¡A§_«h¨t²Î±N°²³]À³¥Îµ{¦¡¨Ï¥Î·®æ¦Ó´À´«±¼¹ï¸Ü²°¡C
³o¨âºØ±¡§Î¡A¥Ñ lpTemplateName Äæ¦ì«ü©wªº¹ï¸Ü²°³£¬O¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡vªº¤l¹ï¸Ü²°¡A¥»³¹¥Hì¹ï¸Ü²°ºÙì¨Óªº¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°¡A¥H¤l¹ï¸Ü²°ºÙ lpTemplateName Äæ¦ì©Ò«üªº¹ï¸Ü²°¡CÀ³¥Îµ{¦¡ÁÙn´£¨ÑÁ`ºÞ·®æªºÄdºI¨ç¦¡¡A¨Ó³B²z·s¼Wªº±±¨î¶µ°T®§¡C
©w¸q¤l¹ï¸Ü²°±ªOªº¤è¦¡¡A¸ò©w¸q¤@¯ë¹ï¸Ü²°±ªO´X¥G¤@¼Ë¡A¦ý¥²¶·¦³©³¤U¥|Ó·®æ¡G
WS_CLIPSIBLINGS ¤§È¬° 4000000h¡Asiblings ¬O¥S§Ì©n©fªº·N«ä¡A¦¹³B«ü¦P¯Åµøµ¡¡Fclip ¬O°Åµôªº·N«ä¡A¬G WS_CLIPSIBLINGS ªº·N«ä´N¬O¦P¯Åµøµ¡¤§¶¡¬Û¤¬°Åµô¡C§ó¸Ô²Óªº»¡¡A·í¨ã¦³¬Û¦P¤÷µøµ¡ªº¤lµøµ¡«Å|®É¡A¹w³]ªº±¡§Î¬O«á±¥Í¦¨ªº¤lµøµ¡·|»\¹Lì¥ýªº¤lµøµ¡¡C¦ý¬O¦pªG«á±¥Í¦¨ªº¤lµøµ¡³]©w¤F WS_CLIPSIBLINGS¡A¨º»ò«Å|ªº³¡¤À¤£·|«·sø»s¡A¤´Åã²{ì¥ýªº¤lµøµ¡¡C¤l¹ï¸Ü²°»Pì¹ï¸Ü²°¤Wªº½T©w¡B¨ú®ø¡B²M³æ²°¡K¡Kµ¥±±¨î¶µ¦PÄÝì¹ï¸Ü²°ªº¤lµøµ¡¡A¤]´N¬O»¡¤l¹ï¸Ü²°»P«ö¶s¡B¨ú®ø¡B²M³æ²°¡K¡Kµ¥±±¨î¶µªºÃö«Y¬O¦P¯Åµøµ¡¡A·í¤l¹ï¸Ü²°¦³ WS_CLIPSIBLINGS ·®æ®É¡A§Y¨Ï«Å|¤]·|Åã²{¥X즳ªº±±¨î¶µ¡C
¦b²Ä¤G¤Q¤@³¹´¿´£¹L¡A¦b¸ê·½´yzÀɤ¤¥H¤U±®æ¦¡©w¸q¹ï¸Ü²°±ªO¡A¤l¹ï¸Ü²°¤]¬O¥Î¤U±®æ¦¡©w¸q¡G
nameID DIALOGEX x, y, width, height[, helpID] STYLE WS_CHILD|WS_CLIPSIBLINGS|DS_3DLOOK|DS_CONTROL¡K¡K [ optional-statements ] BEGIN control-type "text", id, x, y, cx, cy [, style] ⁝ END
¤Wz®æ¦¡¤¤¡ASTYLE ¥]§t¤F«e±´£¹Lªº¥|ºØ·®æ¡A·íµMÁÙ¥i¥H¨ã¦³¨ä¥L·®æ¡A¥i¦b«á±²K¥[¡A¬G¥H¡u¡K¡K¡vªí¥Ü¡C
¦ý§@¬°ì¹ï¸Ü²°ªº¤l¹ï¸Ü²°¡A¦w±Æ¨ä¤¤·s¼W±±¨î¶µªº¦ì¸m´N¦¨¤F°ÝÃD¡A¤£¹L¦Ü¤Ö¦³¤TºØ¤èªk¯à°÷¨Ï¥Î¡C²Ä¤@ºØ±Ä¥Î¹w³]¤è¦¡¡A¨t²Î·|±Nì¹ï¸Ü²°ªº°ª«×¼W¥[¡A©Ò¼W¥[ªº°ª«×´N¬O¤W±®æ¦¡¤¤ªº height¡C¤l¹ï¸Ü²°ªº width¡A¤£½×¬O§_¶W¹Lì¹ï¸Ü²°¼e«×¡A¦b¿Ã¹õ¤WÅã¥Üªº¤´¬Oì¹ï¸Ü²°ªº¼e«×¡C¦ý¦pªG width ¤p©óì¹ï¸Ü²°ªº¼e«×¡A¶·½T«O·s¼Wªº±±¨î¶µ¤´¸¨¦b¤l¹ï¸Ü²°½d³ò¤º¡A§_«h¥i¯à¬Ý¤£¨£©Î¯Ê¤Ö¤@³¡¥÷¡F¦pªG width ¶W¹Lì¹ï¸Ü²°ªº¼e«×¡A¨º»ò¶W¹Lªº³¡¤À¤£·|Åã¥Ü¥X¨Ó¡C¤W±®æ¦¡¤¤ªº x¡By ¤£¨Ï¥Î¡A¨t²Î·|©¿²¤¥¦Ì¡C¦b¤Wz BEGIN »P END ¤§¶¡ªº©Ò¦³·s¼Wªº±±¨î¶µ¡A³£·|©ñ¦b¼W¥[ªº°ª«×½d³ò¤º¡A¤]´N¬O¦bì¹ï¸Ü²°±±¨î¶µªº¤U¤è¡C
¨Ò¦p©³¤Uªº¹ï¸Ü²°±ªO©Ò¥Í¦¨ªº¤l¹ï¸Ü²°¦b¹Ï¤@¤U±¬õ¦â®Øªº³¡¤À¡A¤W±¬Oì¹ï¸Ü²°¡C
IDDLG DIALOGEX 10,10,280,16 STYLE WS_CHILD|WS_CLIPSIBLINGS|DS_3DLOOK\ |DS_CONTROL BEGIN LTEXT "¿ï¾ÜI´º¦â:",IDS_CLR,50,1,40,12 COMBOBOX IDCB_CLR,95,0,124,12\ ,CBS_DROPDOWNLIST END
¤l¹ï¸Ü²°ªºìÂI´N¬O¬õ¦â®Øªº¥ª¤W¨¤¡A¦Ó¦b BEGIN »P END ¤§¶¡©w¸qªº·s¼W±±¨î¶µ¥ª¤W¨¤®y¼Ð¡A³£¬O¥H³oìÂI¬°°ò·Ç¡A¨ä¼e»P°ªªº³æ¦ì§¡¬°¡u¹ï¸Ü²°³æ¦ì¡]DLU¡^¡v¡C¦p¦P¹Ï¤@ IDS_CLR¡BIDCB_CLR ¨â±±¨î¶µªº¥ª¤W¨¤®y¼Ð¡C
²Ä¤GºØ¤èªk¬O¦b¤l¹ï¸Ü²°±ªO¤¤©w¸q¤@ÓÀRºA±±¨î¶µ¡A¨Ã±N¨äÃѧO½X³]¬° stc32¡]¥¦©w¸q¦b WinInc ¤¤ªº DLGS.INC Àɮפ¤¡A¨äȬ° 45fh¡^¡C¦b³oºØ±¡§Î¤U¡A¨t²Î·|§â stc32 ·í§@ì¹ï¸Ü²°¡A¤]´N¬O stc32 ªº X¡BY ®y¼Ð¬°ì¹ï¸Ü²°ªº¥ª¤W¨¤®y¼Ð¡A¨ä¼e»P°ª¬°ì¹ï¸Ü²°ªº¼e»P°ª¡CÁöµM¹ê»Ú¨âªÌ·¥¥i¯à¬O¤£¦Pªº¡A¦ý«o¤£§«Ãª¨t²Î³]©w·s¼W±±¨î¶µªº¦ì¸m¡C
¤l¹ï¸Ü²°ªº¼e»P°ª³Ì¦n¤j©ó stc32 ªº¼e»P°ª¡A°£«D¥´ºâ§â·s¼W±±¨î¶µ³£©ñ¦bì¹ï¸Ü²°¤º¡C·íµM¡A¦]¬° stc32 ªº¼e»P°ª¬O¹ï¸Ü²°±ªO¦Û¦æ°²³]ªº¡A¨ä¤ñ¨Ò¥²¦³»~®t¡A©Ò¥H¦pªG¤l¹ï¸Ü²°²¤¤p©ó stc32¡A¦³®É¤]¤£·|¦³¤Ó¤j°ÝÃD¡C¤£½×¦p¦ó¡A³Ì«á¨t²Î©Òø»sªº¹ï¸Ü²°¡A·|¥H¤l¹ï¸Ü²°ªº¼e«×»P°ª«×ø¥X¡C
µM«á¨t²Î´N·|§â·s¼Wªº±±¨î¶µ»P stc32 ¨Ì¾Ú¥H¤U³W«h¦w±Æ¦ì¸m¡G
¤W±ªº 2¡ã4 ³W«h¥i¥H²z¸Ñ¬°¡A¦pªG·s¼W±±¨î¶µ¦bì¹ï¸Ü²°½d³ò¤º¡A¨º»ò´N¥H¹ï¸Ü²°¼ÒªO¤W·s¼W±±¨î¶µªº¦ì¸m¬°·Ç¡F¦pªG¶W¹L¡A¨º»ò´N§â·s¼Wªº±±¨î¶µ²¾¨ì¶ZÂ÷ì¹ï¸Ü²°¥kÃä©Î¤UÃä¡A¥B»Pì¹ï¸Ü²°¥k½t©Î¤U½tªº¶ZÂ÷´N¬O¶W¹Lªº³¡¤À¡C
©³¤UÁ|Ó¨Ò¤l»¡©ú¡C°²³]¦³Ó¤l¹ï¸Ü²°¡A¨ä¹ï¸Ü²°±ªO©w¸q¦p¤U¡G
IDDLG DIALOGEX 10,100,385,190 STYLE WS_CHILD|WS_CLIPSIBLINGS|DS_3DLOOK|DS_CONTROL BEGIN LTEXT "",stc32,40,10,200,200,WS_BORDER LTEXT "Àɮ׸ê®Æ¡G",IDS_INFO,320,40,50,65,WS_BORDER CONTROL "",IDS_BMP,"STATIC",SS_BITMAP|WS_BORDER,320,110,60,75 PUSHBUTTON "¿ï¶µ",IDB_OPT,90,173,45,10 END
¥Í¦¨ªº¹ï¸Ü²°¦p¤U¹Ï¡C¦¹¹ï¸Ü²°¼e«×¬° 385¡A°ª«×¬° 190¡A§Y¤l¹ï¸Ü²°¤j¤p¡C¹Ï¤¤ÂŦâ®y¼Ð ( 40,10 )¡A¬O stc32 ¥ª¤W¨¤¦ì¸m¡A«e±´£¹Ln§â stc32 µø¬°ì¹ï¸Ü²°¡AÁöµM stc32 ªº¼e«×»P°ª«×³£¬O 200¡A¦Óì¹ï¸Ü²°¨Ã«D¥¿¤è§Î¡A©Ò¥H»Pì¹ï¸Ü²°¤Ø¤o¤£²Å¦ý¤£ºÞ¥¦¡C¿ï¶µ«ö¶sªº X ®y¼Ð¬O 90¡A¤p©ó stc32 ªº X ®y¼Ð»P¦ì¸m¤§©M¡]200¡Ï40¡^¡A´«¥y¸Ü»¡¦b¤ô¥¤è¦V¤W¡A¿ï¶µ«ö¶s¦b stc32 ½d³ò¤º¡A¬G¿ï¶µ«ö¶sªº X ®y¼Ð¬O 90¡C¦P²z¡A¨ä Y ®y¼Ð¤]¨S¶W¥X stc32 ½d³ò¡A¬G Y ®y¼Ð¬O 173¡C¡uÀɮ׸ê®Æ¡G¡vÀRºA±±¨î¶µ¡AIDS_INFO¡A¨ä x ¬° 320¡A¤ñ stc32 ªº x »P¼e«×¤§©M¡]40¡Ï200¡×240¡^¤j¡F¦]¦¹ IDS_INFO ªº X ®y¼Ð¶ZÂ÷ stc32 ¥k½t 320¡Ð240¡×80 ³B¡CIDS_INFO ªº y ¬° 40¡A¤ñ stc32 ªº y »P°ª«×¤§©M¡]10¡Ï200¡×210¡^¤p¡F¦]¦¹ IDS_INFO ªº Y ®y¼Ð¬° 40¡C¨£¤W¹Ï¬õ¦â¹³¯À®y¼Ð¡]¥Ò,40¡^¡C
²Ä¤TºØ¤èªk¬O¦bÄdºI¨ç¦¡¤¤³B²z WM_SIZE °T®§®É¡A©I¥s SetWindowPos ³]©w·s¼W±±¨î¶µªº¦ì¸m»P¤Ø¤o¡C±Ä¨ú³oºØ¤èªk®É¡A¦b©w¸q¤l¹ï¸Ü²°ªº¹ï¸Ü²°±ªO®É¡A·s¼W±±¨î¶µªº¦ì¸m»P¤Ø¤o´N¤£«n¡AÀH·N©w¸q¤]µL§«¡A¤Ï¥¿³£¬O¥Ñ SetWindowPos ªº°Ñ¼Æ¨M©w¡C
©I¥s SetWindowPos ³]©w·s¼W±±¨î¶µªº¦ì¸m¤Î¤Ø¤o¡AY¦Ò¼{ì¹ï¸Ü²°¤º±±¨î¶µªº¦ì¸m¡B¤Ø¤o¨Ã»P¤§¹ï»ô¡A·|¸û¬°¬üÆ[¡C¨BÆJ¦p¤U¡G
ÃѧO½X | ¼ÆÈ | »¡©ú | ÃѧO½X | ¼ÆÈ | »¡©ú |
stc2 | 441h | ÀÉ®×Ãþ«¬ÀRºA±±¨î¶µ | cmb1 | 470h | ÀÉ®×Ãþ«¬½Æ¦X®Ø |
stc3 | 442h | ÀɮצWºÙÀRºA±±¨î¶µ | cmb13 | 47ch | ÀɮצWºÙ½Æ¦X®Ø |
stc4 | 443h | ·j´M¦ì¸mÀRºA±±¨î¶µ | cmb2 | 471h | ·j´M¦ì¸m½Æ¦X®Ø |
lst1 | 460h | Åã¥ÜÀɮתº²M³æ²° | chx1 | 410h | °ßŪ½Æ¿ï®Ø |
IDOK | 1 | ¶}±ÒÂÂÀÉ«ö¶s | IDCANCEL | 2 | ¨ú®ø«ö¶s |
psh15 | 40eh | »¡©ú«ö¶s |
¤W±ªº¹Lµ{¶È¶È¬O©w¸q¦n¤l¹ï¸Ü²°¡A¥H¤Î¨ä¤ºªº·s¼W±±¨î¶µªº¦ì¸m¤Î¤Ø¤o¡A¦ý³oÁÙ¤£°÷¡CÀ³¥Îµ{¦¡¥²¶·´£¨ÑÄdºI¨ç¦¡¡A·s¼W±±¨î¶µ©Òµo¥Xªº°T®§¡A·|µo°e¨ìÄdºI¨ç¦¡¤¤¡F´N¹³¨ä¥L¹ï¸Ü²°¤Wªº±±¨î¶µ¡A§â°T®§µo°e¨ìµøµ¡¨ç¦¡¤@¼Ë¡C¨Ò¦p¡A·í¨Ï¥ÎªÌ¥H·Æ¹«¥ªÁäÂIÀ»¤l¹ï¸Ü²°¤¤ªº«ö¶s®É¡AÄdºI¨ç¦¡·|¦¬¨ì WM_COMMAND °T®§¡CÄdºI¨ç¦¡¤]t³dªì©l¤Æ·s¼Wªº±±¨î¶µ¡A³o¨Ç¸ò¨ä¥L¹ï¸Ü²°¨ç¦¡¤@¼Ë¡A¦b¦¬¨ì WM_INITDIALOG °T®§®É³B²z¡C
¦ýnª`·N¡A·íÄdºI¨ç¦¡¦¬¨ì WM_INITDIALOG °T®§®É¡A¨t²Î©|¥¼±N·s¼W±±¨î¶µ²¾°Ê¨ì³Ì²×¦ì¸m¡A©Ò¥H¦pªGn²¾°Ê·s¼W±±¨î¶µªº¦ì¸m¡A¤£À³¦b³B²z WM_INITDIALOG °T®§®É¡AÀ³¦b¦¬¨ì WM_SIZE °T®§®É³B²z¡C³o¤]´N¬O¬°¤°»ò²Ä¤TºØ¤èªk¡An¦b WM_SIZE °T®§¤¤³]©w·s¼W±±¨î¶µ¦ì¸m¤Ø¤oªº½t¬G¡C
VIEWBMP5 ¦b¶}±ÒÂÂÀɹï¸Ü²°¤¤·s¼W¤@ÓÀRºA±±¨î¶µ¤Î¤@Ó¤U©Ô²M³æ«¬½Æ¦X®Ø¡A¨£¤U±¹Ï¤T¥ªÃä¥Hµµ¬õ¦â®Ø®Ø¦íªº³¡¤À¡C³o¨âÓ·s¼Wªº±±¨î¶µ¦ì©ó¶}±ÒÂÂÀɪº¤l¹ï¸Ü²°¤W¡A¥Î²Ä¤TºØ¤èªk¨Ï¥¦Ì¦b stc2 »P cmb1 ¥¿¤U¤è¡C¨Ï¥ÎªÌ¥i¥H©ó¤U©Ô²M³æ«¬½Æ¦X®Ø¤¤¿ï¾ÜÃC¦â¡A¶}±ÒÂÂÀɹï¸Ü²°ªºI´º¦â·|ÀH¤§§ïÅÜ¡]¹Ï¤T¥kÃä¡^¡C
©³¤U¬O VIEWBMP5.EXE.MANIFEST¡G
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
21 |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="AtHome.Wanker.ViewBmp5"
version="1.0.0.0"
processorArchitecture="amd64"
/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly> |
©³¤U¬O VIEWBMP5.RC¡G
1 2 3 4
5 6 7 8 9 10
11 12 13 14 15 16
17 18 19 20 21 22
23 24 25 26 27 28
29 |
#include "RESOURCE.H"
#define VBMENU 2000
#define IDM_OPEN 2001
#define IDM_QUIT 2002
#define IDM_HELP 2003
#define IDDLG 3000
#define IDS_CLR 3001
#define IDCB_CLR 3002
VBMENU MENU
BEGIN
POPUP "ÀÉ®×"
BEGIN
MENUITEM "¶}±Ò",IDM_OPEN
MENUITEM "Â÷¶}",IDM_QUIT
END
MENUITEM "»¡©ú",IDM_HELP
END
#define RT_MANIFEST 24
1 RT_MANIFEST MOVEABLE PURE "VIEWBMP5.EXE.MANIFEST"
2004 ICON EYE.ICO
IDDLG DIALOGEX 10,10,280,16
STYLE WS_CHILD|WS_CLIPSIBLINGS|DS_3DLOOK|DS_CONTROL
BEGIN
LTEXT "¿ï¾ÜI´º¦â:",IDS_CLR,0,0,0,0
COMBOBOX IDCB_CLR,0,0,0,0,CBS_DROPDOWNLIST
END |
ª`·N¨ì VIEWBMP5.RC ªº²Ä 27¡ã28 ¦æ¡A§â·s¼W±±¨î¶µªº¦ì¸m»P¤Ø¤o³£³]¬°¹s¡Aµ·²@¤£§«®`À³¥Îµ{¦¡ªº°õ¦æ»P¾Þ§@¡C
©³¤U¬O VIEWBMP5.ASM¡G
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
37 38 39 40 41 42
43 44 45 46 47 48
49 50 51 52 53 54
55 56 57 58 59 60
61 62 63 64 65 66
67 68 69 70 71 72
73 74 75 76 77 78
79 80 81 82 83 84
85 86 87 88 89 90
91 92 93 94 95 96
97 98 99 100 101 102
103 104 105 106 107 108
109 110 111 112 113 114
115 116 117 118 119 120
121 122 123 124 125 126
127 128 129 130 131 132
133 134 135 136 137 138
139 140 141 142 143 144
145 146 147 148 149 150
151 152 153 154 155 156
157 158 159 160 161 162
163 164 165 166 167 168
169 170 171 172 173 174
175 176 177 178 179 180
181 182 183 184 185 186
187 188 189 190 191 192
193 194 195 196 197 198
199 200 201 202 203 204
205 206 207 208 209 210
211 212 213 214 215 216
217 218 219 220 221 222
223 224 225 226 227 228
229 230 231 232 233 234
235 236 237 238 239 240
241 242 243 244 245 246
247 248 249 250 251 252
253 254 255 256 257 258
259 260 261 262 263 264
265 266 267 268 269 270 |
OPTION CASEMAP:NONE
OPTION WIN64:3
OPTION LITERALS:ON
_WIN32_WINNT EQU 500h ;¨Ï¥ÎWindows 2000¤Î¨ä¥H«áªºOPENFILENAMEª©¥»
UNICODE EQU 1 ;¨Ï¥ÎUNICODE½s½X¦r¤¸
VBMENU EQU 2000
IDM_OPEN EQU 2001
IDM_QUIT EQU 2002
IDM_HELP EQU 2003
IDDLG EQU 3000 ;¦Ûqªº¤l¹ï¸Ü²°±ªOÃѧO½X
IDS_CLR EQU 3001 ;¦b¶}±ÒÂÂÀɹï¸Ü²°¤¤·s¼W¥[ªº¡u¿ï¾ÜI´º¦â¡G¡vÀRºA±±¨î¶µÃѧO½X
IDCB_CLR EQU 3002 ;¦b¶}±ÒÂÂÀɹï¸Ü²°¤¤·s¼W¥[ªº¤U©Ô²M³æ½Æ¦X®ØÃѧO½X
INCLUDE WINDOWS.INC
INCLUDELIB GDI32.LIB
INCLUDELIB KERNEL32.LIB
INCLUDELIB USER32.LIB
INCLUDELIB COMDLG32.LIB
;***************************************************************************************************
.CONST
szClass DW "VIEWBMP",0
szTitle DW 89c0h,770bh,4f4dh,5143h,5716h,0 ;Æ[¬Ý¦ì¤¸¹Ï
szRem DW 89c0h,770bh,42h,4dh,50h,5716h,7247h,6a94h ;Æ[¬ÝBMP¹Ï¤ùÀÉ
DW 7684h,7c21h,55aeh,7a0bh,5f0fh,3002h,0 ;ªºÂ²³æµ{¦¡¡C
szSure DW 78bah,5b9ah,9000h,51fah,55ceh,0ff1fh,0 ;½T©w°h¥X¶Ü¡H
szAsk DW 8a62h,554fh,0 ;¸ß°Ý
szNote DW 8aaah,660eh,0 ;»¡©ú
szExt DW 42,46,62h,6dh,70h,0 ;"*.bmp",0
;©³¤Uªº¿z¿ï¦r¦ê¬O¡u"¦ì¤¸¹Ï(*.bmp)",0,"*.bmp",0,"©Ò¦³ÀÉ®×(*.*)",0,"*.*",0,0¡v
szFiltr DW 4f4dh,5143h,5716h,"(*.bmp)",0,"*.bmp",0,6240h,6709h,6a94h,6848h,"(*.*)",0,"*.*",0,0
szClrD DW 9810h,8a2dh,7684h,80cch,666fh,984fh,8272h,0 ;¹w³]ªºI´ºÃC¦â
szClrB DW 6de1h,85cdh,8272h,0 ;²HÂŦâ
szClrG DW 6de1h,7da0h,8272h,0 ;²Hºñ¦â
szClrR DW 6de1h,7d05h,8272h,0 ;²H¬õ¦â
;***************************************************************************************************
.DATA
hInst DQ ?
ofn OPENFILENAME <>
szFile DW 256 DUP (0)
hOFN DQ ? ;¶}±ÒÂÂÀɹï¸Ü²°ªºµøµ¡¥N½X
hStc DQ ? ;·s¼WªºÀRºA±±¨î¶µ¥N½X
hCmb DQ ? ;·s¼Wªº½Æ¦X®Ø¥N½X
hbrD DQ ? ;¹w³]ªºI´º¦âµe¨ê
hbrB DQ ? ;²HÂŦâµe¨ê
hbrG DQ ? ;²Hºñ¦âµe¨ê
hbrR DQ ? ;²H¬õ¦âµe¨ê
color DD 0 ;¶}±ÒÂÂÀɪºI´ºÃC¦â¡G0¡Ð¹w³]ªºI´ºÃC¦â¡B1¡Ð²HÂÅ¡B2¡Ð²Hºñ¡B3¡Ð²H¬õ
;***************************************************************************************************
.CODE
;---------------------------------------------------------------------------------------------------
HookPrc PROC hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL hFont:HFONT,hStc2:HWND,hStc3:HWND,hCmb1:HWND
LOCAL rcStc2:RECT,rcStc3:RECT,rcCmb1:RECT,ptStc:POINT,ptCmb:POINT
.if uMsg==WM_NOTIFY
ASSUME r11:PTR OFNOTIFY
mov r11,lParam
mov eax,[r11].hdr.code
.if eax==CDN_HELP
;³B²z¨Ï¥ÎªÌ«ö¤U¡u»¡©ú¡v«ö¶s
invoke MessageBox,hWnd,OFFSET szRem,OFFSET szNote,MB_OK or MB_ICONINFORMATION
.endif
ASSUME r11:NOTHING
.elseif uMsg==WM_SIZE
mov hStc2,RV(GetDlgItem,hOFN,stc2) ;ÀÉ®×Ãþ«¬ÀRºA±±¨î¶µ¥N½X
mov hStc3,RV(GetDlgItem,hOFN,stc3) ;ÀɮצWºÙÀRºA±±¨î¶µ¥N½X
invoke GetWindowRect,hStc2,ADDR rcStc2 ;¨ú±o³o¨âÓ±±¨î¶µ©Ò¦b¯x§Î°Ï°ì
invoke GetWindowRect,hStc3,ADDR rcStc3 ;¦¹°Ï°ì¬°¿Ã¹õ®y¼Ð
;pºâ·s¼WªºÀRºA±±¨î¶µ¥ª¤W¨¤¦ì¸m»P¨ä¼e«×»P°ª«×¡A¨ÃÂà´«¦¨¤u§@°Ï®y¼Ð
mov r9d,rcStc2.top
mov r8d,rcStc2.left
sub r9d,rcStc3.top
mov ptStc.x,r8d ;ptStc.x¬°·s¼WªºÀRºA±±¨î¶µ¥ª¤W¨¤¹³¯ÀªºX®y¼Ð
add r9d,rcStc2.top
mov ptStc.y,r9d ;ptStc.y¬°·s¼WªºÀRºA±±¨î¶µ¥ª¤W¨¤¹³¯ÀªºY®y¼Ð
mov ptCmb.y,r9d ;ptCmb.y¬°·s¼Wªº½Æ¦X®Ø¥ª¤W¨¤¹³¯ÀªºY®y¼Ð
invoke ScreenToClient,hOFN,ADDR ptStc
mov r10d,rcStc2.right
mov r11d,rcStc2.bottom
sub r10d,rcStc2.left ;·s¼WªºÀRºA±±¨î¶µªº¼e«×
sub r11d,rcStc2.top ;·s¼WªºÀRºA±±¨î¶µªº°ª«×
;§â·s¼WªºÀRºA±±¨î¶µ²¾¨ì©Òpºâ¥X¨Óªº¦ì¸m
invoke SetWindowPos,hStc,HWND_TOP,ptStc.x,ptStc.y,r10d,r11d,SWP_SHOWWINDOW
;pºâ·s¼Wªº½Æ¦X®Ø¥ª¤W¨¤¦ì¸m»P¨ä¼e«×»P°ª«×¡A¨ÃÂà´«¦¨¤u§@°Ï®y¼Ð
mov hCmb1,RV(GetDlgItem,hOFN,cmb1) ;ÀÉ®×Ãþ«¬½Æ¦X®Ø¥N½X
invoke GetWindowRect,hCmb1,ADDR rcCmb1
mov r11d,rcCmb1.left
mov ptCmb.x,r11d ;ptCmb.x¬°·s¼Wªº½Æ¦X®Ø¥ª¤W¨¤¹³¯ÀªºX®y¼Ð
invoke ScreenToClient,hOFN,ADDR ptCmb
mov r10d,rcCmb1.right
mov r11d,rcCmb1.bottom
sub r10d,rcCmb1.left ;·s¼Wªº½Æ¦X®Øªº¼e«×
sub r11d,rcCmb1.top ;·s¼Wªº½Æ¦X®Øªº°ª«×
;§â·s¼Wªº½Æ¦X®Ø²¾¨ì©Òpºâ¥X¨Óªº¦ì¸m
invoke SetWindowPos,hCmb,HWND_TOP,ptCmb.x,ptCmb.y,r10d,r11d,SWP_SHOWWINDOW
.elseif uMsg==WM_INITDIALOG
mov hOFN,RV(GetParent,hWnd) ;Àò±o¶}±ÒÂÂÀɹï¸Ü²°ªºµøµ¡¥N½X
;§â·s¼WªºÀRºA±±¨î¶µ»P½Æ¦X®Øªº¦r§Î¡A³]¬°»P¶}±ÒÂÂÀɹï¸Ü²°ªº¦r§Î¬Û¦P
mov hFont,RV(SendMessage,hOFN,WM_GETFONT,0,0)
mov hStc,RV(GetDlgItem,hWnd,IDS_CLR) ;Àò±o¦ÛqÀRºA±±¨î¶µ¥N½X
mov hCmb,RV(GetDlgItem,hWnd,IDCB_CLR) ;Àò±o¦Ûq½Æ¦X®Ø¥N½X
invoke SendMessage,hStc,WM_SETFONT,hFont,1 ;§â¦ÛqÀRºA±±¨î¶µªº¤å¦r³]¬°»P¶}±ÒÂÂÀɦP¼Ë¦r§Î
invoke SendMessage,hCmb,WM_SETFONT,hFont,1 ;§â¦Ûq½Æ¦X®Øªº¤å¦r³]¬°»P¶}±ÒÂÂÀɦP¼Ë¦r§Î
;¦b·s¼Wªº½Æ¦X®Ø¤¤²K¥[¸ê®Æ
invoke SendMessage,hCmb,CB_ADDSTRING,0,ADDR szClrD ;§â"¹w³]ªºI´ºÃC¦â"¥[¤J½Æ¦X®Ø¤º
invoke SendMessage,hCmb,CB_ADDSTRING,0,ADDR szClrB ;§â"²HÂŦâ"¥[¤J½Æ¦X®Ø¤º
invoke SendMessage,hCmb,CB_ADDSTRING,0,ADDR szClrG ;§â"²Hºñ¦â"¥[¤J½Æ¦X®Ø¤º
invoke SendMessage,hCmb,CB_ADDSTRING,0,ADDR szClrR ;§â"²H¬õ¦â"¥[¤J½Æ¦X®Ø¤º
;³]©w¤W¦¸ªºÃC¦â¿ï¶µ
invoke SendMessage,hCmb,CB_SETCURSEL,color,0
.elseif uMsg==WM_COMMAND
mov rax,r8 ;R8W¡×ÃѧO½X
shr eax,16 ;AX¡×³qª¾½X
.if r8w==IDCB_CLR
.if ax==CBN_SELCHANGE
;·í¨Ï¥ÎªÌ¦b½Æ¦X®Ø¤¤¿ï¾Ü¤F¤@ºØÃC¦â¡A±N¸ÓÃC¦âªº¯Á¤Þ¦s¤Jcolor¡A¨Ã±N¾ãÓ¤l¹ï¸Ü²°³]¬°µL®Ä°Ï°ì
invoke SendMessage,hCmb,CB_GETCURSEL,0,0
mov color,eax
invoke InvalidateRect,hWnd,0,1
.endif
.endif
.elseif uMsg==WM_CTLCOLORDLG
;¨Ì¾Úcolor¤§È¡A³]©w¬Û¹ïÀ³ªºµe¨ê¡A¥H§ïÅܤl¹ï¸Ü²°ªºI´ºÃC¦â
.if color==0
mov rax,hbrD
.elseif color==1
mov rax,hbrB
.elseif color==2
mov rax,hbrG
.else
mov rax,hbrR
.endif
jmp quit ;ª`·N¡I³B²zWM_CTLCOLORDLG«á¡A¦^¶ÇȬ°µe¨ê¥N½X
.else
exit: xor rax,rax ;¥¼³B²zªº°T®§¡A¦^¶Çȳ]¬°¹s
ret
.endif
mov rax,1 ;¤w³B²zªº°T®§¡A¦^¶Çȳ]¬°¤@
quit: ret
HookPrc ENDP
;---------------------------------------------------------------------------------------------------
WndProc PROC hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL hBitmap:HBITMAP,rcClnt:RECT,bitmap:BITMAP,hDC:HDC,hdcMem:HDC
.if uMsg==WM_COMMAND
.if r8w==IDM_OPEN
;«Ø¥ß¶}±ÒÂÂÀɹï¸Ü²°¡A¨Ñ¨Ï¥ÎªÌ¿ï¾ÜÀÉ®×
mov r11,hWnd
mov r10,hInst
lea r9,szFiltr
lea r8,szFile
lea rdx,szExt
mov ofn.lStructSize,SIZEOF ofn
mov ofn.hwndOwner,r11
mov ofn.hInstance,r10
mov ofn.lpstrFilter,r9
mov ofn.lpstrCustomFilter,0
mov ofn.nFilterIndex,1
mov ofn.lpstrFile,r8
mov ofn.nMaxFile,LENGTHOF szFile
mov ofn.lpstrFileTitle,0
mov ofn.nMaxFileTitle,0
mov ofn.lpstrInitialDir,0
mov ofn.lpstrTitle,0
mov ofn.Flags,OFN_EXPLORER or OFN_SHOWHELP or OFN_ENABLEHOOK or OFN_HIDEREADONLY or\
OFN_ENABLETEMPLATE
mov ofn.lpstrDefExt,rdx
lea r10,HookPrc
mov ofn.lCustData,0
mov ofn.lpfnHook,r10
mov ofn.lpTemplateName,IDDLG ;³]¬°¦Ûqªº¤l¹ï¸Ü²°±ªO
mov ofn.pvReserved,0
mov ofn.dwReserved,0
mov ofn.FlagsEx,0
invoke GetOpenFileName,ADDR ofn
mov hBitmap,RV(LoadImage,hInst,ADDR szFile,IMAGE_BITMAP,0,0,LR_LOADFROMFILE)
;¦pªGµLªk¸ü¤J¨Ï¥ÎªÌ¿ï¾Üªº¦ì¤¸¹Ï¡ARAX·|µ¥©ó¹s¡A¤£°µ³B²zªð¦^
or rax,rax
jz rtn
invoke GetObject,hBitmap,SIZEOF BITMAP,ADDR bitmap
mov r10d,bitmap.bmWidth
mov r11d,bitmap.bmHeight
;pºâ¯à®e¯Ç¾ã±i¦ì¤¸¹Ïªºµøµ¡»Ýn³Ì¤p¼e«×»P°ª«×
mov rcClnt.left,0
mov rcClnt.top,0
mov rcClnt.right,r10d
mov rcClnt.bottom,r11d
invoke AdjustWindowRect,ADDR rcClnt,WS_CAPTION or WS_SYSMENU,0
mov r10d,rcClnt.right
mov r11d,rcClnt.bottom
sub r10d,rcClnt.left
sub r11d,rcClnt.top
invoke MoveWindow,hWnd,50,50,r10d,r11d,0
;Åã¥Ü¨Ï¥ÎªÌ©Ò¿ï¾Üªº¦ì¤¸¹Ï
mov hDC,RV(GetDC,hWnd)
mov hdcMem,RV(CreateCompatibleDC,hDC)
invoke SelectObject,hdcMem,hBitmap
invoke BitBlt,hDC,0,0,bitmap.bmWidth,bitmap.bmHeight,hdcMem,0,0,SRCCOPY
invoke DeleteDC,hdcMem
invoke ReleaseDC,hWnd,hDC
.elseif r8w==IDM_HELP
invoke MessageBox,hWnd,OFFSET szRem,OFFSET szNote,MB_OK or MB_ICONINFORMATION
.elseif r8w==IDM_QUIT
invoke SendMessage,hWnd,WM_CLOSE,0,0
.endif
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage,0
.elseif uMsg==WM_CLOSE
close: cmp RV(MessageBox,0,ADDR szSure,ADDR szAsk,MB_YESNO or MB_ICONQUESTION),IDYES
jne rtn
invoke DeleteObject,hbrD
invoke DeleteObject,hbrB
invoke DeleteObject,hbrG
invoke DeleteObject,hbrR
invoke DestroyWindow,hWnd
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage,0
.else
def: invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.endif
rtn: xor rax,rax
ret
WndProc ENDP
;---------------------------------------------------------------------------------------------------
main PROC
LOCAL hwnd:HWND,msg:MSG,wc:WNDCLASSEX
invoke GetSysColor,COLOR_BTNFACE ;¨ú±o¨t²Î¹w³]ªº¹ï¸Ü²°I´ºÃC¦â
mov hbrD,RV(CreateSolidBrush,eax) ;«Ø¥ß¹w³]ªºI´º¦âµe¨ê
mov hbrB,RV(CreateSolidBrush,0ffc040h) ;«Ø¥ß²HÂŦâµe¨ê
mov hbrG,RV(CreateSolidBrush,040ff40h) ;«Ø¥ß²Hºñ¦âµe¨ê
mov hbrR,RV(CreateSolidBrush,0d090ffh) ;«Ø¥ß²H¬õ¦âµe¨ê
lea rdx,WndProc
mov hInst,RV(GetModuleHandle,0)
mov wc.cbSize,SIZEOF WNDCLASSEX
mov wc.style,CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc,rdx
mov wc.cbClsExtra,0
mov wc.cbWndExtra,0
mov wc.hInstance,rax
mov wc.hIcon,RV(LoadIcon,hInst,2004)
mov wc.hIconSm,rax
mov wc.hCursor,RV(LoadCursor,NULL,IDC_ARROW)
mov wc.hbrBackground,COLOR_WINDOW+1
mov wc.lpszMenuName,VBMENU
lea rdx,szClass
mov wc.lpszClassName,rdx
invoke RegisterClassEx,ADDR wc
mov hwnd,RV(CreateWindowEx,0,ADDR szClass,OFFSET szTitle,WS_OVERLAPPEDWINDOW,\
50,50,400,200,0,0,hInst,0)
invoke ShowWindow,hwnd,SW_SHOWNORMAL
invoke UpdateWindow,hwnd
.while TRUE
invoke GetMessage,ADDR msg,0,0,0
.break .if rax==0
invoke TranslateMessage,ADDR msg
invoke DispatchMessage,ADDR msg
.endw
invoke ExitProcess,0
main ENDP
;***************************************************************************************************
END main |
VIEWBMP5 ªºì²z³£¤w´£¹L¡A´N¤£¦AÅo¶Û¤F¡C
¥´ÅK¶X¼ö¡I©³¤U¦AÄ~Äò»¡©ú¤l¹ï¸Ü²°»PÄdºI¨ç¦¡ªºÀ³¥Î¡C
¨ã¦³Á`ºÞ·®æªº¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°¡A¦pªG¦³ÄdºI¨ç¦¡¡A¨º»ò¨Ï¥ÎªÌ¾Þ§@¥¦®É¡A·|§â³qª¾½X¸g¥Ñ WM_NOTIFY °T®§¡Aµo°e¨ìÄdºI¨ç¦¡¤¤¡C¦b«e¤@³¹ªº VIEWBMP4 ¤¤¡A¤w¸g®i²{¤FÄdºI¨ç¦¡¦p¦ó³B²z CDN_HELP¡C¨Æ¹ê¤W¡A¯àµo°eµ¹ÄdºI¨ç¦¡ªº³qª¾½X¤£¬O¥u¦³ CDN_HELP¡A±`¨£ªº³qª¾½X¦p¤U¡]³o¨Ç³qª¾½X³£¬OtÈ¡^¡G
³qª¾½X | »¡©ú |
CDN_FILEOK -606 | ·í¨Ï¥ÎªÌ¤w¸g«ü©wÀɮצW¡A¨Ã«ö¤U¡u¶}±ÒÂÂÀÉ¡v«ö¶s®É¡Aµo¥X¦¹³qª¾½X¡C |
CDN_FOLDERCHANGE -603 | ·í¨Ï¥ÎªÌÅܧó¸ê®Æ§¨®É¡Aµo¥X¦¹³qª¾½X¡C¤£½×¬O±q cmb2 ½Æ¦X®Ø¤¤Åܧó©Î±q lst1 ¤ºªº¸ê®Æ§¨¶µ¥ØÅܧó¡A³£·|µo¥X¦¹³qª¾½X¡C |
CDN_HELP -605 | ·í¨Ï¥ÎªÌ«ö¤U¡u»¡©ú¡v«ö¶s®É¡Aµo¥X¦¹³qª¾½X¡C |
CDN_INCLUDEITEM -608 | ·í¨Ï¥ÎªÌÅܧó¸ê®Æ§¨®É¡A·|¬°¸Ó¸ê®Æ§¨¤ºªº¨CÓ¶µ¥Øµo¥X¦¹³qª¾½X¡A¨ÑÄdºI¨ç¦¡³B²z¸Ó¶µ¥Ø¡F¦ý¥u¦³¦b Flags ³]©w OFN_ENABLEINCLUDENOTIFY ºX¼Ð®É¡A¤~·|µo¥X¦¹³qª¾½X¡C |
CDN_INITDONE -601 | ·í¨t²Î¤w¸g§â¹ï¸Ü²°¤Wªº±±¨î¶µ²¾¨ì¾A·í¦ì¸m¤§«á¡Aµo¥X¦¹³qª¾½X¡C |
CDN_SELCHANGE -602 | ·í¨Ï¥ÎªÌ¦b lst1 ²M³æ²°±±¨î¶µ¤¤¡A¿ï¾Ü·sªº¶µ¥Ø®É¡A·|µo¥X¦¹³qª¾½X¡C |
CDN_SHAREVIOLATION -604 | ·í¨Ï¥ÎªÌ«ö¤U¡u¶}±ÒÂÂÀÉ¡v«ö¶s¡A¥B©Ò¿ï¨úªºÀÉ®×µo¥Íºô¸ô¦@¥Î¹H³W®É¡Aµo¥X¦¹³qª¾½X¡C |
¤W±³o¤CºØ³qª¾½X¡A³£¬OÂÇ¥Ñ WM_NOTIFY °T®§¶Çµ¹ÄdºI¨ç¦¡¡C¦b¦¬¨ì WM_NOTIFY °T®§«á¡AwParam ¬Oµo¥X WM_NOTIFY ªº±±¨î¶µ¤§ÃѧO½X¡AlParam ¬O OFNOTIFY µ²ºcÅé¦ì§}¡AOFNOTIFY µ²ºcÅéÓÄæ¦ì·N¸q¦p¤U¡G
OFNOTIFY STRUCT QWORD hdr NMHDR <> ;NMHDR µ²ºcÅé lpOFN DQWORD ? ;OPENFILENAME µ²ºcÅé¦ì§} pszFile LPSTR ? ;ÀɮצWºÙ¦ì§} OFNOTIFY ENDS
¨ä¤¤ªº²Ä¤@ÓÄæ¦ì¡Ahdr ¬O¥t¤@ÓºÙ¬° NMHDR ªºµ²ºcÅé¡A¨äÄæ¦ì¦p¤U¡A¨ä¤¤ªº code Äæ¦ì´N¬O³qª¾½X¡G
NMHDR STRUCT hwndFrom HWND ? ;µo¥X WM_NOTIFY °T®§ªº±±¨î¶µ¥N½X idFrom DWORD ? ;µo¥X WM_NOTIFY °T®§ªº±±¨î¶µÃѧO½X code DWORD ? ;³qª¾½X NMHDR ENDS
¦Ü©ó¦p¦ó¦s¨ú³qª¾½X¡A¨£¤W¤@³¹¡C
¨ã¦³Á`ºÞ·®æªº¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°¡A¥i¹ïÄdºI¨ç¦¡µo¥X³qª¾½X¡F¬Û¤Ïªº¡AÀ³¥Îµ{¦¡¤]¯àµo°e°T®§µ¹¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°¡A¥HÀò¨ú¦UÃþ¸ê®Æ©Î³]©w¬Y¨Ç¸ê®Æ¡C¹ï¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°µo°e°T®§ªº¤èªk¬O©I¥s SendMessage¡A¨ä¤¤²Ä¤@ӰѼƬO¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°ªºµøµ¡¥N½X¡A¥i¥H©I¥s GetParent ±o¨ì¡C²Ä¤G¡B¤T¡B¥|ӰѼƤÀ§O¬O°T®§ºØÃþ¡BwParam¡BlParam¡A¨£¤Uªí¡C¤Uªí¬O¥i¥Hµo°eªº°T®§¡A¦ý³o¨Ç°T®§³£¥²¶·¹ï¨ã¦³Á`ºÞ·®æªº¹ï¸Ü²°µo°e¤~¦³®Ä¡G
°T®§ | »¡©ú | wParam | lParam | ¦^¶ÇÈ |
CDM_GETFILEPATH 465h | Àò±o¨Ï¥ÎªÌ¦b¹ï¸Ü²°¤¤©Ò¿ï¨úÀɮשθô®|¦WºÙ | ½w½Ä°Ï¤j¤p¡A¥H¦r¤¸¬°³æ¦ì | ±µ¦¬Àɮשθô®|¦WºÙªº½w½Ä°Ï¦ì§} | Y°õ¦æ¦¨¥\¡A¶Ç¦^ȬOÀɦW©Î¸ô®|¦Wªø«×¡]¥H¦r¤¸¬°³æ¦ì¡A¥]§tµ²§Àªº¹s¡^¡A¥B lParam ©Ò«ü¦ì§}¬°§¹¾ãÀɦW©Î¸ô®|¦W¡FY½w½Ä°Ï¤Ó¤p¡A¦^¶ÇȬ°©Ò»Ýªº½w½Ä°Ï¤j¤p¡A¥B lParam ©Ò«ü¦ì§}¤§¤º®e¤£ÅÜ¡FYµo¥Í¿ù»~¡A¶Ç¦^Ȥp©ó¹s |
CDM_GETFOLDERIDLIST 467h |
Àò±o¹ï¸Ü²°¤¤¥Ø«e¶}±Ò¤§¸ê®Æ§¨ªº¶µ¥ØÃѧO½X¦Cªí¡]item identifier list¡A°Ñ¾\µù¤@¡^ | ½w½Ä°Ï¤j¤p¡A¥H¦ì¤¸²Õ¬°³æ¦ì | ±µ¦¬¶µ¥ØÃѧO½X¦Cªí¤§½w½Ä°Ï¦ì§} | Y°õ¦æ¦¨¥\¡A¶Ç¦^ȬO¶µ¥ØÃѧO½X¦Cªíªø«×¡]¥H¦ì¤¸²Õ¬°³æ¦ì¡A¥]§tµ²§Àªº¹s¡^¡A¥B lParam ©Ò«ü¦ì§}¬°¶µ¥ØÃѧO½X¦Cªí¡FY½w½Ä°Ï¤Ó¤p¡A¦^¶ÇȬ°©Ò»Ýªº½w½Ä°Ï¤j¤p¡A¥B lParam ©Ò«ü¦ì§}¤§¤º®e¤£ÅÜ¡FYµo¥Í¿ù»~¡A¶Ç¦^Ȥp©ó¹s |
CDM_GETFOLDERPATH 464h | Àò±o¦b¹ï¸Ü²°¤¤¥Ø«e¶}±Ò¤§¸ê®Æ§¨ªº¸ô®|¦WºÙ | ½w½Ä°Ï¤j¤p¡A¥H¦r¤¸¬°³æ¦ì | ±µ¦¬¸ô®|¦WºÙªº½w½Ä°Ï¦ì§} | Y°õ¦æ¦¨¥\¡A¶Ç¦^ȬO¸ô®|¦Wªø«×¡]¥H¦r¤¸¬°³æ¦ì¡A¥]§tµ²§Àªº¹s¡^¡A¥B lParam ©Ò«ü¦ì§}¬°¸ô®|¦W¡FY½w½Ä°Ï¤Ó¤p¡A¦^¶ÇȬ°©Ò»Ýªº½w½Ä°Ï¤j¤p¡A¥B lParam ©Ò«ü¦ì§}¤§¤º®e¤£ÅÜ¡FYµo¥Í¿ù»~¡A¶Ç¦^Ȥp©ó¹s |
CDM_GETSPEC 464h | Àò±o¦b¹ï¸Ü²°¤¤¡A¨Ï¥ÎªÌ¿ï¨ú¤£¥]§t¸ô®|ªºÀɮצWºÙ | ½w½Ä°Ï¤j¤p¡A¥H¦r¤¸¬°³æ¦ì | ±µ¦¬ÀɮצWºÙªº½w½Ä°Ï¦ì§} | Y°õ¦æ¦¨¥\¡A¶Ç¦^ȬOÀɦWªø«×¡]¥H¦r¤¸¬°³æ¦ì¡A¥]§tµ²§Àªº¹s¡^¡A¥B lParam ©Ò«ü¦ì§}¬°ÀɦW¡FY½w½Ä°Ï¤Ó¤p¡A¦^¶ÇȬ°©Ò»Ýªº½w½Ä°Ï¤j¤p¡A¥B lParam ©Ò«ü¦ì§}¤§¤º®e¤£ÅÜ¡FYµo¥Í¿ù»~¡A¶Ç¦^Ȥp©ó¹s |
CDM_HIDECONTROL 469h | ÁôÂùï¸Ü²°¤¤ªº¬YÓ±±¨î¶µ | nÁôÂ꺱±¨î¶µÃѧO½X | ¤£¨Ï¥Î¡AÀ³³]¬°¹s | µL |
CDM_SETCONTROLTEXT 468h | ³]©w¹ï¸Ü²°¤¤¬YÓ±±¨î¶µªº¤å¦r | n³]©w¤å¦rªº±±¨î¶µÃѧO½X | n³]©wªº¦r¦ê¦ì§} | µL |
CDM_SETDEFEXT 46ah | ³]©w¹w³]°ÆÀɦW | ¤£¨Ï¥Î¡AÀ³³]¬°¹s | ¹w³]°ÆÀɦW¦ì§}¡A¤£¯à¥]§t¡u.¡v | µL |
VIEWBMP6 ¦b¶}±ÒÂÂÀɹï¸Ü²°ªº¥kÃ䤤·s¼W¤TÓÀRºA±±¨î¶µ¡A¨£¹Ï¥|¥kÃä¥Hµµ¬õ¦â®Ø®Ø¦íªº³¡¤À¡CVIEWBMP6 ¥Î²Ä¤GºØ¤èªk¡A§â³o¤TÓ±±¨î¶µ©w¦ì¦b¹ï¸Ü²°¥kÃä¡C¨Ï¥ÎªÌ©ó²M³æ²°ªº²³¦hÀɮפ¤¬D¿ï¤@ÓÀɮ׫á¡AVIEWBMP6 ·|§â¸ÓÀɮתº¸ê®ÆÅã¥Ü©ó³o¤TÓ±±¨î¶µ¤¤¡A¥]§t¹wÄý¹Ï¤ù¡C
©³¤U¬O VIEWBMP6.EXE.MANIFEST¡G
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
type="win32"
name="AtHome.Wanker.VIEWBMP6"
version="1.0.0.0"
processorArchitecture="amd64"
/>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly> |
©³¤U¬O VIEWBMP6.RC¡G
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 |
#include "RESOURCE.H"
#define VBMENU 2000
#define IDM_OPEN 2001
#define IDM_QUIT 2002
#define IDM_HELP 2003
#define IDDLG 3000
#define IDS_INFO 3001
#define IDS_BRWS 3002
#define IDS_BMP 3003
#define stc32 0x45f
VBMENU MENU
BEGIN
POPUP "ÀÉ®×"
BEGIN
MENUITEM "¶}±Ò",IDM_OPEN
MENUITEM "Â÷¶}",IDM_QUIT
END
MENUITEM "»¡©ú",IDM_HELP
END
#define RT_MANIFEST 24
1 RT_MANIFEST MOVEABLE PURE "VIEWBMP6.EXE.MANIFEST"
2004 ICON EYE.ICO
IDDLG DIALOGEX 0,0,269,180
STYLE WS_CHILD|WS_CLIPSIBLINGS|DS_3DLOOK|DS_CONTROL
BEGIN
LTEXT "",stc32,0,0,200,200
LTEXT "",IDS_INFO,204,2,61,66
LTEXT "¹Ï¤ù¹wÄý¡G",IDS_BRWS,200,82,60,10
CONTROL "",IDS_BMP,"STATIC",SS_BITMAP,200,90,67,85
END |
VIEWBMP6.RC ±Ä¥Î stc32 ©w¦ì·s¼Wªº±±¨î¶µ¡C¨£²Ä 30¡ã33 ¦æ¡A±oª¾ IDS_INFO¡BIDS_BRWS¡BIDS_BMP ªº X ®y¼Ð¤£¬O¶W¹L stc32 ªº¼e«×¡A§Y 200¡A´N¬O«ê¦n¬Ûµ¥¡A©Ò¥H¥¦Ì»Pì¹ï¸Ü²°¥k½tÃä½uªº¶ZÂ÷¬O¥¦Ì X ®y¼Ð»P stc32 ¼e«×¤§®t¡F¬G IDS_INFO ¶ZÂ÷ì¹ï¸Ü²°¥kÃä 4 Ó DLU ³B¡AIDS_BRWS¡BIDS_BMP ³£ºò¶KµÛì¹ï¸Ü²°¥k½tÃä½u¤W¡CIDS_INFO¡BIDS_BRWS¡BIDS_BMP ªº Y ®y¼Ð§¡¤p©ó stc32 ªº°ª«×¡A§Y 200¡A¬G¤À§O¶ZÂ÷¹ï¸Ü²°¤W½tÃä½u 2¡B82¡B90 Ó DLU ³B¡C
¦]¬°¦³ stc32 ©w¦ì¡A¬G VIEWBMP6.ASM ¤£¶·³B²z WM_SIZE °T®§¡C©³¤U¬O VIEWBMP6.ASM¡G
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
37 38 39 40 41 42
43 44 45 46 47 48
49 50 51 52 53 54
55 56 57 58 59 60
61 62 63 64 65 66
67 68 69 70 71 72
73 74 75 76 77 78
79 80 81 82 83 84
85 86 87 88 89 90
91 92 93 94 95 96
97 98 99 100 101 102
103 104 105 106 107 108
109 110 111 112 113 114
115 116 117 118 119 120
121 122 123 124 125 126
127 128 129 130 131 132
133 134 135 136 137 138
139 140 141 142 143 144
145 146 147 148 149 150
151 152 153 154 155 156
157 158 159 160 161 162
163 164 165 166 167 168
169 170 171 172 173 174
175 176 177 178 179 180
181 182 183 184 185 186
187 188 189 190 191 192
193 194 195 196 197 198
199 200 201 202 203 204
205 206 207 208 209 210
211 212 213 214 215 216
217 218 219 220 221 222
223 224 225 226 227 228
229 230 231 232 233 234
235 236 237 238 |
OPTION CASEMAP:NONE
OPTION WIN64:3
OPTION LITERALS:ON
_WIN32_WINNT EQU 500h ;¨Ï¥ÎWindows 2000¤Î¨ä¥H«áªºOPENFILENAMEª©¥»
UNICODE EQU 1 ;¨Ï¥ÎUNICODE½s½X¦r¤¸
VBMENU EQU 2000
IDM_OPEN EQU 2001
IDM_QUIT EQU 2002
IDM_HELP EQU 2003
IDDLG EQU 3000
IDS_INFO EQU 3001
IDS_BRWS EQU 3002
IDS_BMP EQU 3003
INCLUDE WINDOWS.INC
INCLUDE SHLOBJ.INC
INCLUDELIB GDI32.LIB
INCLUDELIB KERNEL32.LIB
INCLUDELIB USER32.LIB
INCLUDELIB COMDLG32.LIB
INCLUDELIB SHELL32.LIB
;***************************************************************************************************
.CONST
szClass DW "VIEWBMP",0
szTitle DW 89c0h,770bh,4f4dh,5143h,5716h,0 ;Æ[¬Ý¦ì¤¸¹Ï
szRem DW 89c0h,770bh,42h,4dh,50h,5716h,7247h,6a94h ;Æ[¬ÝBMP¹Ï¤ùÀÉ
DW 7684h,7c21h,55aeh,7a0bh,5f0fh,3002h,0 ;ªºÂ²³æµ{¦¡¡C
szSure DW 78bah,5b9ah,9000h,51fah,55ceh,0ff1fh,0 ;½T©w°h¥X¶Ü¡H
szAsk DW 8a62h,554fh,0 ;¸ß°Ý
szNote DW 8aaah,660eh,0 ;»¡©ú
szExt DW 42,46,62h,6dh,70h,0 ;"*.bmp",0
;©³¤Uªº¿z¿ï¦r¦ê¬O¡u"¦ì¤¸¹Ï(*.bmp)",0,"*.bmp",0,"©Ò¦³ÀÉ®×(*.*)",0,"*.*",0,0¡v
szFiltr DW 4f4dh,5143h,5716h,"(*.bmp)",0,"*.bmp",0,6240h,6709h,6a94h,6848h,"(*.*)",0,"*.*",0,0
szCrt DW 5efah,7acbh,6642h,9593h,0ff1ah,13,10,0 ;«Ø¥ß®É¶¡¡G
szAcc DW 6700h,8fd1h,5b58h,53d6h,6642h,9593h,0ff1ah,13,10,0 ;³Ìªñ¦s¨ú®É¶¡¡G
szWrt DW 6700h,8fd1h,5bebh,5165h,6642h,9593h,0ff1ah,13,10,0 ;³Ìªñ¼g¤J®É¶¡¡G
szFmt1 DW "%s%04d/%02d/%02d %02d:%02d:%02d.%03d",13,10,13,10,0
szFmt2 DW 6a94h,6848h,5927h,5c0fh,40,4f4dh,5143h,7d44h,41,0ff1ah,13,10,37,73,54,52,117,0 ;Àɮפj¤p¡G%I64u
;***************************************************************************************************
.DATA
hInst DQ ?
hOFN DQ ? ;¶}±ÒÂÂÀɹï¸Ü²°ªºµøµ¡¥N½X
szFile DW 256 DUP (0)
ofn OPENFILENAME <>
;***************************************************************************************************
.CODE
;---------------------------------------------------------------------------------------------------
;§âÀɮתº¬YӮɶ¡¦s¤JpBfr©Ò«üªº¦ì§}¤W¡CpStr¬O¡u«Ø¥ß®É¶¡¡G¡v¡B¡u³Ìªñ¦s¨ú®É¶¡¡G¡v¡B¡u³Ìªñ¼g¤J®É¶¡¡G¡v
;¤T¦r¦ê¦ì§}¡ApFt¬OFILETIMEµ²ºcÅé¦ì§}¡A¹ïÀ³¤Wz¤TºØ®É¶¡¡Cinfo¨C¦¸³B²z¤@Ӯɶ¡¡A©I¥s¤T¦¸³B²z¤TºØ®É¶¡¡C
info PROC pBfr:QWORD,pStr:QWORD,pFt:QWORD
LOCAL utc:SYSTEMTIME,lot:SYSTEMTIME ;utc¬O¥@¬É¨ó½Õ®É¶¡¡Alot¬O·í¦a®É¶¡
invoke FileTimeToSystemTime,pFt,ADDR utc
invoke SystemTimeToTzSpecificLocalTime,0,ADDR utc,ADDR lot
invoke wsprintf,pBfr,OFFSET szFmt1,pStr,lot.wYear,lot.wMonth,lot.wDay,\
lot.wHour,lot.wMinute,lot.wSecond,lot.wMilliseconds
shl rax,1 ;RAX¬Owsprintf¼g¤JpBfrªº¦r¤¸Ó¼Æ¡A¼¥H2«áÅܦ줸²Õ
add rax,pBfr ;RAX«ü¦V¤U¦¸©I¥s®É½w½Ä°Ï¦ì§}
ret
info ENDP
;---------------------------------------------------------------------------------------------------
HookPrc PROC hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL hFont:HFONT,buffer[256]:WORD,szFn[256]:WORD,w32fa:WIN32_FILE_ATTRIBUTE_DATA
LOCAL hBitMap:HBITMAP,bitmap:BITMAP,rcBmp:RECT,hDC:HDC,hdcMem:HDC
.if uMsg==WM_NOTIFY
ASSUME r11:PTR OFNOTIFYEX
mov r11,lParam
mov eax,[r11].hdr.code
.if eax==CDN_HELP
invoke MessageBox,hWnd,OFFSET szRem,OFFSET szNote,MB_OK
.elseif eax==CDN_SELCHANGE
ASSUME r11:NOTHING
invoke SendMessage,hOFN,CDM_GETFILEPATH,LENGTHOF szFn,ADDR szFn
invoke GetFileAttributesEx,ADDR szFn,GetFileExInfoStandard,ADDR w32fa
invoke info,ADDR buffer,OFFSET szCrt,ADDR w32fa.ftCreationTime ;³B²z«Ø¥ß®É¶¡
invoke info,rax,OFFSET szAcc,ADDR w32fa.ftLastAccessTime ;³B²z³Ìªñ¦s¨ú®É¶¡
invoke info,rax,OFFSET szWrt,ADDR w32fa.ftLastWriteTime ;¦s¨ú³Ìªñ¼g¤J®É¶¡
test w32fa.dwFileAttributes,FILE_ATTRIBUTE_DIRECTORY ;Y¨Ï¥ÎªÌ¿ï¾Ü¸ê®Æ§¨¡A¤£Åã¥ÜÀɮפj¤p
jnz pnt
mov r8,QWORD PTR w32fa.nFileSizeHigh
rol r8,20h
invoke wsprintf,rax,OFFSET szFmt2,r8 ;³B²zÀɮפj¤p
pnt: invoke SetDlgItemText,hWnd,IDS_INFO,ADDR buffer
invoke GetWindowRect,RV(GetDlgItem,hWnd,IDS_BMP),ADDR rcBmp
mov hDC,RV(GetDC,RV(GetDlgItem,hWnd,IDS_BMP))
mov hdcMem,RV(CreateCompatibleDC,hDC)
;Y¨Ï¥ÎªÌ¿ï¾Ü¸ê®Æ§¨¡A¥u»ÝÅã¥Ü¥Õ¦â¡F¦pªG¿ï¾Üªº¬OÀɮסA¤~Åã¥Ü©Ò¿ïBMPÀÉÁY¹Ï
test w32fa.dwFileAttributes,FILE_ATTRIBUTE_DIRECTORY
jz pic
invoke BitBlt,hDC,0,0,rcBmp.right,rcBmp.top,hdcMem,0,0,WHITENESS ;¥uÅã¥Ü¥Õ¦â
jmp del_dc
pic: invoke LoadImage,hInst,ADDR szFn,IMAGE_BITMAP,0,0,LR_LOADFROMFILE
or rax,rax
jz del_dc
mov hBitMap,rax
invoke GetObject,hBitMap,SIZEOF BITMAP,ADDR bitmap
invoke SelectObject,hdcMem,hBitMap
invoke SetStretchBltMode,hDC,HALFTONE
invoke SetBrushOrgEx,hDC,0,0,0
mov r9d,rcBmp.right
mov r10d,rcBmp.bottom
sub r9d,rcBmp.left
sub r10d,rcBmp.top
invoke StretchBlt,hDC,0,0,r9d,r10d,hdcMem,0,0,bitmap.bmWidth,bitmap.bmHeight,SRCCOPY
del_dc: invoke DeleteDC,hdcMem
invoke ReleaseDC,hWnd,hDC
.endif
.elseif uMsg==WM_INITDIALOG
mov hOFN,RV(GetParent,hWnd)
mov hFont,RV(SendMessage,hOFN,WM_GETFONT,0,0)
invoke SendMessage,RV(GetDlgItem,hWnd,IDS_INFO),WM_SETFONT,hFont,1
invoke SendMessage,RV(GetDlgItem,hWnd,IDS_BRWS),WM_SETFONT,hFont,1
.else
xor rax,rax ;¥¼³B²zªº°T®§¡A¦^¶Çȳ]¬°¹s
ret
.endif
exit: mov rax,1 ;¤w³B²zªº°T®§¡A¦^¶Çȳ]¬°¤@
ret
HookPrc ENDP
;---------------------------------------------------------------------------------------------------
WndProc PROC hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
LOCAL hBitmap:HBITMAP,rcClnt:RECT,bitmap:BITMAP,hDC:HDC,hdcMem:HDC
.if uMsg==WM_COMMAND
.if r8w==IDM_OPEN
;«Ø¥ß¶}±ÒÂÂÀɹï¸Ü²°¡A¨Ñ¨Ï¥ÎªÌ¿ï¾ÜÀÉ®×
mov r11,hWnd
mov r10,hInst
lea r9,szFiltr
lea r8,szFile
lea rdx,szExt
mov ofn.lStructSize,SIZEOF ofn
mov ofn.hwndOwner,r11
mov ofn.hInstance,r10
mov ofn.lpstrFilter,r9
mov ofn.lpstrCustomFilter,0
mov ofn.nFilterIndex,1
mov ofn.lpstrFile,r8
mov ofn.nMaxFile,LENGTHOF szFile
mov ofn.lpstrFileTitle,0
mov ofn.nMaxFileTitle,0
mov ofn.lpstrInitialDir,0
mov ofn.lpstrTitle,0
mov ofn.Flags,OFN_SHOWHELP or OFN_EXPLORER or OFN_ENABLEHOOK or OFN_ENABLETEMPLATE
mov ofn.lpstrDefExt,rdx
lea r10,HookPrc
mov ofn.lCustData,0
mov ofn.lpfnHook,r10
mov ofn.lpTemplateName,IDDLG ;³]¬°¦Ûqªº¤l¹ï¸Ü²°±ªO
mov ofn.pvReserved,0
mov ofn.dwReserved,0
mov ofn.FlagsEx,0
invoke GetOpenFileName,ADDR ofn
mov hBitmap,RV(LoadImage,hInst,ADDR szFile,IMAGE_BITMAP,0,0,LR_LOADFROMFILE)
;¦pªGµLªk¸ü¤J¨Ï¥ÎªÌ¿ï¾Üªº¦ì¤¸¹Ï¡ARAX·|µ¥©ó¹s¡A¤£°µ³B²zªð¦^
or rax,rax
jz rtn
invoke GetObject,hBitmap,SIZEOF BITMAP,ADDR bitmap
mov r10d,bitmap.bmWidth
mov r11d,bitmap.bmHeight
;pºâ¯à®e¯Ç¾ã±i¦ì¤¸¹Ïªºµøµ¡»Ýn³Ì¤p¼e«×»P°ª«×
mov rcClnt.left,0
mov rcClnt.top,0
mov rcClnt.right,r10d
mov rcClnt.bottom,r11d
invoke AdjustWindowRect,ADDR rcClnt,WS_CAPTION or WS_SYSMENU,0
mov r10d,rcClnt.right
mov r11d,rcClnt.bottom
sub r10d,rcClnt.left
sub r11d,rcClnt.top
invoke MoveWindow,hWnd,50,50,r10d,r11d,0
;Åã¥Ü¨Ï¥ÎªÌ©Ò¿ï¾Üªº¦ì¤¸¹Ï
mov hDC,RV(GetDC,hWnd)
mov hdcMem,RV(CreateCompatibleDC,hDC)
invoke SelectObject,hdcMem,hBitmap
invoke BitBlt,hDC,0,0,bitmap.bmWidth,bitmap.bmHeight,hdcMem,0,0,SRCCOPY
invoke DeleteDC,hdcMem
invoke ReleaseDC,hWnd,hDC
.elseif r8w==IDM_HELP
invoke MessageBox,hWnd,OFFSET szRem,OFFSET szNote,MB_OK or MB_ICONINFORMATION
.elseif r8w==IDM_QUIT
invoke SendMessage,hWnd,WM_CLOSE,0,0
.endif
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage,0
.elseif uMsg==WM_CLOSE
close: cmp RV(MessageBox,0,ADDR szSure,ADDR szAsk,MB_YESNO or MB_ICONQUESTION),IDYES
jne rtn
invoke DestroyWindow,hWnd
.elseif uMsg==WM_DESTROY
invoke PostQuitMessage,0
.else
def: invoke DefWindowProc,hWnd,uMsg,wParam,lParam
ret
.endif
rtn: xor rax,rax
ret
WndProc ENDP
;---------------------------------------------------------------------------------------------------
main PROC
LOCAL hwnd:HWND,msg:MSG,wc:WNDCLASSEX
mov hInst,RV(GetModuleHandle,0)
mov wc.cbSize,SIZEOF WNDCLASSEX
lea rdx,WndProc
mov wc.style,CS_HREDRAW or CS_VREDRAW
mov wc.lpfnWndProc,rdx
mov wc.cbClsExtra,0
mov wc.cbWndExtra,0
mov wc.hInstance,rax
mov wc.hIcon,RV(LoadIcon,hInst,2004)
mov wc.hIconSm,rax
mov wc.hCursor,RV(LoadCursor,NULL,IDC_ARROW)
mov wc.hbrBackground,COLOR_WINDOW+1
mov wc.lpszMenuName,VBMENU
lea rdx,szClass
mov wc.lpszClassName,rdx
invoke RegisterClassEx,ADDR wc
mov hwnd,RV(CreateWindowEx,0,ADDR szClass,OFFSET szTitle,WS_OVERLAPPEDWINDOW,\
50,50,400,200,0,0,hInst,0)
invoke ShowWindow,hwnd,SW_SHOWNORMAL
invoke UpdateWindow,hwnd
.while TRUE
invoke GetMessage,ADDR msg,0,0,0
.break .if rax==0
invoke TranslateMessage,ADDR msg
invoke DispatchMessage,ADDR msg
.endw
invoke ExitProcess,0
main ENDP
;***************************************************************************************************
END main |
VIEWBMP6.ASM »P VIEWBMP5.ASM ®t¤£¦h¡A¥Dn®t§O¦b©ó HookPoc ÄdºI¨ç¦¡¡C¦b VIEWBMP6.ASM ¤¤¡A¤£³B²z WM_SIZE¡BWM_COMMAND »P WM_CTLCOLORDLG¡A¦ý¬O¦b³B²z WM_NOTIFY °T®§¤¤¡A¦h¤F³B²z CDN_SELCHANGE ³qª¾½X¡C·í¨Ï¥ÎªÌ¥H·Æ¹«ÂI¿ï lst1 ¤¤ªº¶µ¥Ø®É¡A¨t²Î·|µo¥X CDN_SELCHANGE ³qª¾½X¡A¥H§iª¾ÄdºI¨ç¦¡¨Ï¥ÎªÌ§ïÅÜ©Ò¿ï¾ÜªºÀɮשΥؿý¡C
¦b³B²z CDN_SELCHANGE ³qª¾½X¡A¥²¶·§¹¦¨¥H¤U¬yµ{¡G
©³¤U»¡©ú VIEWBMP6.ASM µ{¦¡½X¡Cº¥ý¤¶²Ð·sªº Win64 API¡A¦A»¡©ú²Ó¸`³¡¤À¡C
GetFileAttributesEx ¥Î©óÀò±oÀɮשΥؿýªº¸ê®Æ¡A³o¨Ç¸ê®Æ¥]§tÀɮשΥؿýªºÄÝ©Ê¡B«Ø¥ß®É¶¡¡B¤W¦¸×§ï®É¶¡¡B¤W¦¸¦s¨ú®É¶¡¡BÀɮפj¤p¡CGetFileAttributesEx¡@ªºì«¬¬O¡G
invoke GetFileAttributesEx,\ lpFileName,\ ; pointer to string that specifies a file or directory fInfoLevelId,\ ; value that specifies the type of attribute information to obtain lpFileInfo ; pointer to buffer to receive attribute information
lpFileName ¬OÀɦW©Î¥Ø¿ý¦W¦ì§}¡A¦¹³BªºÀɦW©Î¥Ø¿ý¦W¶·¥H¹sµ²§À¡C¦pªG¬O ANSI ª©ªº GetFileAttributesEx¡AÀɦW©Î¥Ø¿ý¦Wªºªø«×¨î¦b MAX_PATH¡F¦pªG¬O¼e¦r¤¸ª©ªº¡A¥BÀɦW©Î¥Ø¿ý¦W¥H¡u\\?\¡v¶}ÀY¡A¨º»ò¨äªø«×¥i¹F 32767 Ó¼e¦r¤¸¡C¨Ò¦p¡u\\?\C:\myworld\private¡vµø¬°¡uC:\myworld\private¡v¡A¦ý¥H«eªÌ§Î¦¡ªºÀɦW©Î¥Ø¿ý¦W¥i¶W¹L 32767 Ó¼e¦r¤¸¡C
fInfoLevelId ¬°nÀò±oªº¸ê®ÆºØÃþ¡A¥Ø«e¡]¥Á°ê 113 ¦~¡^¥u¯à¬O GetFileExInfoStandard¡]¨äȬ°¹s¡^¡C¥¼¨Ó¥i¯à·|·s¼W¨ä¥LÈ¡A¥HÀò±o¨ä¥L¸ê®Æ¡C¦pªG fInfoLevelId ³]¬° GetFileExInfoStandard¡A¨º»ò²Ä¤TӰѼơAlpFileInfo ´N¬O WIN32_FILE_ATTRIBUTE_DATA µ²ºcÅ骺¦ì§}¡C¥Ø«e fInfoLevelId ¥u¯à¬O GetFileExInfoStandard¡A©Ò¥H lpFileInfo ¤]¥u¯à¬O WIN32_FILE_ATTRIBUTE_DATA µ²ºcÅ骺¦ì§}¡C¦pªG°õ¦æ¦¨¥\¡Aªð¦^Ȭ°«D¹sÈ¡A¥B WIN32_FILE_ATTRIBUTE_DATA µ²ºcÅé·|¶ñ¤J¥¿½Tªº¸ê®Æ¡F¦pªG¥¢±Ñ¡Aªð¦^Ȭ°¹s¡A¥i¥H©I¥s GetLastError ±o¨ì§ó¸Ô²Ó¿ù»~°T®§¡C
WIN32_FILE_ATTRIBUTE_DATA µ²ºcÅ餺¬ö¿ý¤FÀɮשΥؿýªºÄݩʤΤ@¨Ç¸ê®Æ¡A¦UÄæ¦ì©w¸q¦p¤U¡G
WIN32_FILE_ATTRIBUTE_DATA STRUCT dwFileAttributes DWORD ? ;ÄÝ©Ê ftCreationTime FILETIME <> ;«Ø¥ß®É¶¡ ftLastAccessTime FILETIME <> ;¤W¦¸¦s¨ú®É¶¡ ftLastWriteTime FILETIME <> ;¤W¦¸×§ï®É¶¡ nFileSizeHigh DWORD ? ;Àɮתø«×ªº°ªÂù¦r²Õ nFileSizeLow DWORD ? ;Àɮתø«×ªº§CÂù¦r²Õ WIN32_FILE_ATTRIBUTE_DATA ENDS
©³¤U»¡©ú WIN32_FILE_ATTRIBUTE_DATA ¦UÄæ¦ì¡G
FILETIME STRUCT dwLowDateTime DWORD ? dwHighDateTime DWORD ? FILETIME ENDS
§Qº¿Äu«Ø¥ßÀɮ׮ɶ¡¶Z¦è¤¸ 1601 ¦~¤¸¤ë¤¸¤é¹s®É¹s¤À¾ã©Ò¸g¾ú¬í¼Æ¡×86400¡Ñ23¡Ï12¡Ñ60¡Ñ60¡Ï30¡Ñ60¡×2032200 ¬í 2032200¬í¡×2032200¡Ñ107Ó 100 ©`¬í¡×127B95975400h Ó 100 ©`¬í
create_time FILETIME <95975400h,127Bh>
FILETIME ©ÒÀx¦sªº®É¶¡¹ï¤j³¡¤Àªº¤H¨Ó»¡¡A«Ü©â¶H«Ü¤£ª½Ä±¡C¦]¦¹ Windows ´£¨Ñ FileTimeToSystemTime ¨ç¦¡±N FILETIME ®æ¦¡ªº®É¶¡Âà´«¬° SYSTEMTIME ªº®æ¦¡¡C¤@¯ë¤H«Ü®e©öÁA¸Ñ SYSTEMTIME ®æ¦¡ªº®É¶¡¡CFileTimeToSystemTime ªºì«¬¦p¤U¡G
invoke FileTimeToSystemTime,\ lpFileTime,\ ; pointer to file time to convert lpSystemTime ; pointer to structure to receive system time
lpFileTime ¬O FILETIME µ²ºcÅ骺¦ì§}¡A¨ä¤º¦³nÂà´«ªº®É¶¡¡A¥B¥²¶·¬O¦b 0¡ã7FFFFFFFFFFFFFFFh ¤§¶¡ªº¥¿¾ã¼Æ¡ClpSystemTime ¬O SYSTEMTIME µ²ºcÅ骺¦ì§}¡A¥Î©ó±µ¦¬Âà´««áªº®É¶¡¡C¦pªG°õ¦æ¦¨¥\¡A¦^¶ÇȬ°¤@¥B lpSystemTime ¦ì§}¤Wªº SYSTEMTIME µ²ºcÅé·|¶ñ¤W¥¿½Tªº®É¶¡¡F¦pªG°õ¦æ¥¢±Ñ¡A¦^¶ÇȬ°¹s¡C
©³¤U¬O SYSTEMTIME µ²ºcÅ骺¦UÄæ¦ì¡G
SYSTEMTIME STRUCT wYear WORD ? ; ¦è¤¸¦~¥÷¡A¥²¶·¦b 1601¡ã30827 ¤§¶¡ wMonth WORD ? ; ¤ë¥÷¡A¥²¶·¦b 1¡ã12 ¤§¶¡ wDayOfWeek WORD ? ; ¬P´Á´X¡A¥²¶·¦b 0¡ã6 ¤§¶¡¡A0 ªí¥Ü¬P´Á¤Ñ¡A1 ªí¥Ü¬P´Á¤@¡A2 ªí¥Ü¬P´Á¤G¡K¡K wDay WORD ? ; ¤é¡A¥²¶·¦b 1¡ã31 ¤§¶¡¡Aµø¤ë¥÷¤Î¬O§_¬°¶|¦~¨M©w¹ê»Ú½d³ò wHour WORD ? ; ®É¡A¥²¶·¦b 0¡ã23 ¤§¶¡ wMinute WORD ? ; ¤À¡A¥²¶·¦b 0¡ã59 ¤§¶¡ wSecond WORD ? ; ¬í¡A¥²¶·¦b 0¡ã59 ¤§¶¡ wMilliseconds WORD ? ; ²@¬í¡A¥²¶·¦b 0¡ã999 ¤§¶¡ SYSTEMTIME ENDS
¦¹ API §â¥@¬É¨ó½Õ®É¶¡Âà´«¬°«ü©w®É°Ïªº·í¦a®É¶¡¡A쫬¬°¡G
invoke SystemTimeToTzSpecificLocalTime,\ lpTimeZone,\ ; pointer to time zone of interest lpUniversalTime,\ ; pointer to universal time of interest lpLocalTime ; pointer to structure to receive local time
lpTimeZone ¬° TIME_ZONE_INFORMATION µ²ºcÅ骺¦ì§}¡A³oÓµ²ºcÅéªí©ú«ü©wªº®É°Ï¡F¦pªG lpTimeZone ¬°¹s¡A¨ç¦¡·|¨Ï¥Î¥Ø«e¨Ï¥Î¤¤ªº®É°Ï¡ClpUniversalTime ¬° SYSTEMTIME µ²ºcÅ骺¦ì§}¡A³oµ²ºcÅ餺¬OnÂà´«¥@¬É¨ó½Õ®É¶¡¡ClpLocalTime ¬O±µ¦¬Âà´««á·í¦a®É¶¡ªº SYSTEMTIME µ²ºcÅé¦ì§}¡C¦pªG°õ¦æ¦¨¥\¡A¦^¶ÇȬ°¤@¥B lpLocalTime ¦ì§}¤Wªº SYSTEMTIME µ²ºcÅé·|¶ñ¤W·í¦a®É¶¡¡F¦pªG°õ¦æ¥¢±Ñ¡A¦^¶ÇȬ°¹s¡C
SetStretchBltMode ¨ç¦¡·|¦b«ü©wªº¸Ë¸m¤º®e¤¤³]©w¦ì¤¸¹ÏÁY©ñ¼Ò¦¡¡A¨ä쫬¬°¡G
invoke SetStretchBltMode,\ hdc,\ ; handle of device context iStretchMode ; bitmap stretching mode
hdc ¬On³]©wªº¸Ë¸m¤º®e¥N½X¡CiStretchMode ÁY©ñ¼Ò¦¡¡A¥i¥H¬O¤U±¥|ºØ¼Ò¦¡¤¤ªº¤@ºØ¡G
¼Ò¦¡ | »¡©ú |
BLACKONWHITE 1 | n®ø°£ªº¹³¯À»P²{¦³ªº¹³¯À¶i¦æ AND ¹Bºâ¡C¦pªG¬O³æ¦âªº¦ì¤¸¹Ï¡A±N¥HÄ묹¥Õ¦â¹³¯À¬°¥N»ù¨Ó«O¯d¶Â¦â¹³¯À¡C»P STRETCH_ANDSCANS ¬Û¦P¡C¾A¦XÁY©ñ¤å¦r©Î²³æ½u±øªº¹Ï®×¡A¥¦Ì³q±`¬O¥Õ©³¶Â¦r¡A¯à¨Ï¤å¦r©Î½u±ø«O«ù²M´·¡C |
COLORONCOLOR 3 | §â®ø°£ªº¹³¯À§R°£¡A§¹¥þ¤£«O¯d¸ê®Æ¡A»P STRETCH_DELETESCANS ¤@¼Ë¡C |
HALFTONE 4 | ±N¨Ó·½½d³ò¤¤ªº¹³¯À¬M®g¦Ü¥Ø¼Ð½d³ò®É¡A¥Ø¼Ð½d³òªº¥§¡ÃC¦âªñ¦ü¨Ó·½¹³¯ÀªºÃC¦â¡C³]©w HALFTONE ¤§«á¡AÀ³¥Îµ{¦¡¶·©I¥s SetBrushOrgEx ¨Ó³]©wµe¨êªº°_©lÂI¡C»P STRETCH_HALFTONE ¬Û¦P¡C¨Ï¥Î¦¹¼Ò¦¡¡A¯à²£¥Í³Ì°ª«~½èªº¹Ï¤ù¡A¦ý»Ýnªá¶O¸û¦h®É¶¡¡C |
WHITEONBLACK 2 | n®ø°£ªº¹³¯À»P²{¦³ªº¹³¯À¶i¦æ OR ¹Bºâ¡C¦pªG¬O³æ¦âªº¦ì¤¸¹Ï¡A±N¥HÄ묹¶Â¦â¹³¯À¬°¥N»ù¨Ó«O¯d¥Õ¦â¹³¯À¡C»P STRETCH_ORSCANS ¬Û¦P¡C¾A¦XÁY©ñ¶Â©³¥Õ¦â¦rªº¹Ï®×¡A¯à¨Ï¤å¦r©Î½u±ø«O«ù²M´·¡C |
¦pªG°õ¦æ¦¨¥\¡A¦^¶ÇȬ°ì¨ÓªºÁY©ñ¼Ò¦¡¡F§_«h¦^¶ÇȬ°¹s¡C
SetBrushOrgEx ¹ï«ü©wªº¸Ë¸m¤º®e³]©w¤U¤@Ó¿ï¤Jµe¨êªº°_©lÂI¡A¨ä쫬¬°¡G
invoke SetBrushOrgEx,\ hdc,\ ; handle of device context nXOrg,\ ; x-coordinate of new origin nYOrg,\ ; y-coordinate of new origin lppt ; points to previous brush origin
hdc ¬O¸Ë¸m¤º®e¥N½X¡CnXOrg¡BnYOrg ¬O¤UÓ¿ï¤Jµe¨êªº°_©lÂI X ®y¼Ð»P Y ®y¼Ð¡Clppt ¬O POINT µ²ºcÅé¦ì§}¡A¥Î©ó±µ¦¬ì¥ýµe¨êªº°_©lÂI¡A¦p¤£»Ýn³oµ§¸ê®Æ¥i±N lppt ³]¬° 0¡C¦pªG°õ¦æ¦¨¥\¡A¦^¶ÇȬ°¤@¡F§_«h¦^¶ÇȬ°¹s¡C
©I¥s SetStretchBltMode ®É¡A¦pªG³]©w HALFTONE ¼Ò¦¡¡A¨t²Î·|¥Í¦¨¤@Ó¯S©wªº halftone brush ¨Ó¼ÒÀÀÁY©ñ«áªº¹³¯À°Ï¶ô¡C¦pªG¨S¦³¥¿½T³]¸mµe¨êªº°_©lÂI¡Aµe¨êªº«½Æ¼Ò¦¡¥i¯à·|»P¥Ø¼Ð°Ï°ìªºÃä¬É¤£¹ï»ô¡A¾ÉP¹Ï®×¥X²{¡uÂ_¼h¡v©Î¡u°¾²¾¡vªº°ÝÃD¡AºÙ¬° brush misalignment¡]µe¨ê¹ï»ô¿ù»~¡^¡C³o¤]´N¬O¬°¤°»ò³]©w HALFTONE ¼Ò¦¡¤§«án©I¥s SetBrushOrgEx ªºì¦]¡C«Ø¥ßµe¨ê®É¡A¹w³]ªº°_©lÂI¬O¡]0,0¡^¡A¦pªG¦Û©l¦Ü²×³£¤£·|§ïÅÜ¡A¤]¥i¥H¤£©I¥s SetBrushOrgEx¡A¦ý¬°¤FÁקK¨t²Î¦Û°Ê½Õ¾ã¥H¤Î¬°¤Fì©lµ{¦¡¥iŪ©Ê¡AÁÙ¬O«Øijn©I¥s SetBrushOrgEx¡C
ÂǥѩI¥s StretchBlt ¥i¥H¥Î¨ÓÁY©ñ¹Ï¤ù¡C¦p¦P BitBlt¡AStretchBlt ·|±N¦ì¤¸¹Ï±q¨Ó·½¸Ë¸m¤º®e¬M®g¨ì¥Ø¼Ð¸Ë¸m¤º®e¡C¤£¹L¡A»P BitBlt ¨ç¦¡¤£¦P¡AStretchBlt ·|®Ú¾Ú¨Ó·½©M¥Ø¼Ð¯x§Îªº«ü©w°Ï°ì¨ÓÁY©ñ¼v¹³¡C¦pªG¨Ó·½¯x§Î¤j©ó¥Ø¼Ð¯x§Î¡A«hµ²ªG¼v¹³·|ÁY¤p¡F¦pªG¨Ó·½¯x§Î¤p©ó¥Ø¼Ð¯x§Î¡A«hµ²ªG¼v¹³·|©ñ¤j¡CStretchBlt 쫬¦p¤U¡G
invoke StretchBlt,\ hdcDest,\ ; handle of destination device context nXOriginDest,\ ; x-coordinate of upper-left corner of dest. rect. nYOriginDest,\ ; y-coordinate of upper-left corner of dest. rect. nWidthDest,\ ; width of destination rectangle nHeightDest,\ ; height of destination rectangle hdcSrc,\ ; handle of source device context nXOriginSrc,\ ; x-coordinate of upper-left corner of source rectangle nYOriginSrc,\ ; y-coordinate of upper-left corner of source rectangle nWidthSrc,\ ; width of source rectangle nHeightSrc,\ ; height of source rectangle dwRop ; raster operation code
hdcDest ¬O¥Ø¼Ð¸Ë¸m¤º®e¥N½X¡AhdcSrc ¬O¨Ó·½¸Ë¸m¤º®e¥N½X¡CStretchBlt ·|§â¨Ó·½¸Ë¸m¤º®e¤¤¡AnXOriginSrc¡BnYOriginSrc ©Ò¥Nªíªº X¡BY ®y¼Ðªº¹³¯À¶}©l¬M®g¨ì¥Ø¼Ð¸Ë¸m¤º®e¤¤ nXOriginDest¡BnYOriginDest ©Ò¥Nªí X¡BY ®y¼Ðªº¹³¯À¤W¡AµM«á¦V¥k¡B¦V¤U§â¬Û¹ïÀ³ªº¹³¯À¤@¤@¬M®g¡C¨Ó·½¸Ë¸m¤º®e¬M®g½d³òªº¼e«×»P°ª«×¡A¤À§O¬O nWidthSrc¡BnHeightSrc¡F¦Ó¬M®g¨ì¥Ø¼Ð¸Ë¸m¤º®eªº¼e«×»P°ª«×¡A¤À§O¬O nWidthDest¡BnHeightDest¡C¦pªG¨âªÌªº¼e«×¡B°ª«×¤£¦P¡A´N·|µo¥ÍÁY©ñ²{¶H¡A¦³¥i¯à·|µo¥Í¥¢¯u¡CÁY©ñ®É·s¼W©ÎÁY´îªº¹³¯À¡A¥Ñ SetStretchBltMode ¨M©w¡A¥¦¤]¯à´î»´¥¢¯uªº±¡§Î¡C¦b¬M®g¹Lµ{¤¤¨Ã«D¶È¶È½Æ»s¡A¥i¥H¶i¦æ¹Bºâ¡A³oÃþ¹Bºâ¥Ñ dwRop ¨M©w¡A»P BitBlt ¬Û¦P¡C
VIEWBMP6.ASM ²Ä 74¡ã83 ¦æªº¥Øªº¬O¦b IDS_INFO ÀRºA±±¨î¶µÅã¥Ü¨Ï¥ÎªÌ©Ò¿ï¾ÜªºÀɮשΥؿý¸ê®Æ¡A¥i¤À¬°¨â³¡¤À¡G①¦pªG¨Ï¥ÎªÌ¿ï¾Üªº¬OÀɮסAnÅã¥ÜÀɮתº«Ø¥ß®É¶¡¡B¤W¦¸¦s¨ú®É¶¡¡B¤W¦¸×§ï®É¶¡»PÀɮפj¤p¥|Ó¶µ¥Ø¡C②¦pªG¬O¥Ø¿ý¡A¥uÅã¥Ü«e±¤T¶µ¸ê®Æ¡C¦Ó«e¤T¶µ¸ê®Æªº¨C¤@¶µ¹Lµ{³£¤@¼Ë¡A´N³s®É¶¡ªº®æ¦¡³£¤@¼Ë¡A¥u¬OÅã¥Üªº¶µ¥Ø¦WºÙ»P®É¶¡¤£¦P¡A¦]¦¹¥Î°Æµ{¦¡ info ¨Ó§¹¦¨¡A¬J´î¤Öµ{¦¡½X¤S²¼ä©úÁA¡C
info °Æµ{¦¡¦b²Ä 49¡ã61 ¦æ¡C¥¦ªº°Ñ¼Æ¦³¤TÓ¡G①½w½Ä°Ï¦ì§}¡AÂà´««áªº®É¶¡·|Åܦ¨¦r¦ê¦s©ó¸Ó¦ì§}¡C②¶µ¥Ø¦WºÙ¦ì§}¡A¶µ¥Ø¦WºÙ´N¬O¡u«Ø¥ß®É¶¡¡G¡v¡B¡u³Ìªñ¦s¨ú®É¶¡¡G¡v¡B¡u³Ìªñ¼g¤J®É¶¡¡G¡v¤TÓ¦r¦ê¡A²Ä¤@¦¸©I¥s®É¬O²Ä¤@Ó¦r¦ê¡B²Ä¤G¦¸©I¥s®É¬O²Ä¤GÓ¦r¦ê¡K¡K③FILETIME ¦ì§}¡A¤À§O¥Nªí¤TӮɶ¡¡Cinfo ªº¦^¶ÇȬO½w½Ä°Ï³Ì«á¤@Ó¦r¤¸ªº¤U¤@Ó¦ì§}¡A¥i¥Î©ó¤U¦¸©I¥s®Éªº½w½Ä°Ï¦ì§}¡C¤]´N¬O»¡¡A³oÓ¦^¶ÇÈ´N¬O¤U¦¸©I¥s®Éªº²Ä¤@ӰѼơC
¦pªG¨Ï¥ÎªÌ¿ï¾Üªº¬O¥Ø¿ý¡A¨º´Nª½±µ¸õ¦Ü²Ä 84 ¦æ¡Apnt: ¼Ð°O³B¡A§â«e±©I¥s¤T¦¸ info ©Ò±oªº¦r¦ê³]¬° IDS_INFO ÀRºA±±¨î¶µªº¤å¦r¡C¦pªG¨Ï¥ÎªÌ¿ï¾Üªº¬OÀÉ®×ÁÙn¦h¤@¥ó¨Æ¡A³B²zÀɮפj¤p¡C
¦b WIN32_FILE_ATTRIBUTE_DATA µ²ºcÅ餤¡AÀɮפj¤p¬ö¿ý©ó nFileSizeHigh¡BnFileSizeLow ¨âÓÄæ¦ì¡C¤@¯ë¦Ó¨¥¡A¥H x86/64 CPU ¬°¤¤¥¡³B²z¾¹ªº IBM PC¡A¦b¦s©ñ¼ÆȮɡA¥H¤pºÝ§Ç±Æ¦C¡A¦ý¦¹³B«o¬O¥H¤jºÝ§Ç±Æ¦C¡A©Ò¥H°ªÂù¦r²Õ¥²¶·»P§CÂù¦r²Õ¤¬´«¡C²Ä 81¡ã82 ¦æ¥ý¸ü¤J¥|¦r²Õ¡AµM«á¦A¸g¥Ñ±ÛÂà«ü¥O±ÛÂà 32 ¦ì¤¸¡A§Y¥i§¹¦¨°ª¡B§CÂù¦r²Õ¤¬´«¡C
VIEWBMP6 ªº¨ä¾l³¡¤À¡A³£¤w¤¶²Ð¹L¡A¥»³¹´N¦¹µ²§ô¡C
¦b DOS ®É¥Nnªí©ú¤@ÓÀɮסA¥²¶·«ü©w¸ÓÀɮצì©óþ¤@ӺϺо÷ªºþ¤@ӥؿý¡A³Ì«á¤~¬OÀɮצWºÙ¡C¨Ò¦p¡uC:\MASM611\BIN\ML.EXE¡v¡A¥¦´Nªí©ú¤F ML.EXE ¦b¡uC:¡vºÏºÐ¾÷ªº¡u\MASM611\BIN\¡v¥Ø¿ýùØ¡Cª`·N¡I³o¨àªºÀÉ®×»P¥Ø¿ýªº^¤å¤À§O¬O files »P directories¡C
¨ì¤F Windows 95/98 ªº®É¥N¡A·L³n§â DOS ªºÀɮשR¦W¨t²Î°µ¤F¤j´T«×ªºÂ½·s¡AºÙ¬°¡u´ß¼h©R¦WªÅ¶¡¡v¡]shell namespace¡^¡C¤U¹Ï¤¬O¶}±Ò Windows 98 ªºÀÉ®×Á`ºÞ«á©Ò§e²{ªºµe±¡A§A¥i¥H¦b¥ªÃ䪺¾ðª¬µ²ºc¿ï¾Ü¬Y¤@¶µ¡A¦b¥k°¼ªº²M³æÀ˵ø±±¨î¶µ¡]list view¡^·|Åã¥Ü¸Ó¶µ¥Ø¤º¦³¨º¨Çª«¥ó¡C¨Ò¦p¥Î·Æ¹«ÂIÀ»¡uMy Documents¡v¡A¥k°¼Åã¥Ü¡uMiso01.jpg¡v¹Ï¤ùÀɤΡuRar.exe¡v¡B¡uUnRar.exe¡v¨âÓ¥i°õ¦æÀÉ¡C¦b¹Ï¤»¤¤¡AÂIÀ»¡u¦Lªí¾÷¡v¡A¥k°¼Åã¥Ü¡u·s¼W¦Lªí¾÷¡v¤Î¡uEpson EPL-6200L Advanced¡v¨âÓª«¥ó¡C
¥Ñ¦¹¥iª¾¡AWindows 98 ¤£¶È¶ÈºÞ²zºÏºÐ¾÷¡BÀɮפΥؿý¡A¥¦ÁÙºÞ²z«DÀɮת«¥ó¡A¨Ò¦p¡uEpson EPL-6200L Advanced¡v¡B¡uºô¸ô¤WªºªÚ¾F¡v¡B¡u±±¨î¥x¡v¡K¡Kµ¥ª«¥ó¡A³o¨Ç«DÀɮת«¥ó¤]ºÙ¬°µêÀÀª«¥ó¡]virtual objects¡^¡C
»P DOS Àɮרt²Î©R¦WªÅ¶¡Ãþ¦ü¡A´ß¼h©R¦WªÅ¶¡¦³¨âÓ¤£¦PªºÃþ«¬¡G①Àɮס]files¡^»P②¸ê®Æ§¨¡]folders¡^¡C³oùتºÀɮפ£¶È¶È¬O¤@¯ëºÏºÐ¾÷¤WªºÀɮסA¥¦ªº½d³ò§ó¤j¤@¨Ç¡A¥¦¬O«ü¾ðª¬µ²ºcªººÝÂI¡AµLªk¦A®e¯Ç¨ä¥Lª«¥ó¡A¤]ºÙ¬°¸¸`ÂI¡C¹³¤W¹Ïªº¡uC:\My Documents\¡v¤ºªº©Ò¦³ÀɮסA¨Ò¦p¡uMiso01.jpg¡v¡B¡uRar.exe¡v¡B¡uUnRar.exe¡v¡A©Î¬O¡uEpson EPL-6200L Advanced¡v¹p®g¦Lªí¾÷¡A³£µø¬°ÀɮסC
¦¹³Bªº¸ê®Æ§¨¡A^¤å¬O folders¡A»P DOS ªºÀɮשR¦W¨t²ÎºÙ¬°¥Ø¿ýªº¤£¦P¡A©Ò¥H§â folders ½Ķ¦¨¸ê®Æ§¨¡C¸ê®Æ§¨¬O¾ðª¬µ²ºcªº¸`ÂI¡A¥¦¥i¥H¥]§tÀɮשΨä¥L¸ê®Æ§¨¡C¹³¤W¹Ïªº¡uMy Documents¡v¡B¡u¦Lªí¾÷¡v³£¬O¸ê®Æ§¨¡C¤£ÄÝ©óÀɮרt²Îªº¸ê®Æ§¨¦³®É³QºÙ¬°µêÀÀ¸ê®Æ§¨¡]virtual folders¡^¡C
´ß¼h©R¦WªÅ¶¡ªº³Ì®Ú¥»¸`ÂI¬O¡u®à±¡v¡]desktop¡^¡A©Ò¦³ªº¸ê®Æ§¨©ÎÀɮ׳£¬O¥Ñ®à±¶}©l¡C¥Ñ¤W¹Ï¥i¥H¬Ý¨£¡A®à±¥]§t¤F¡u§Úªº¹q¸£¡v¡B¡u§Úªº¤å¥ó§¨¡v¡B¡uInternet Explorer¡v¡K¡Kµ¥¸ê®Æ§¨ª«¥ó¡C¦b§Úªº¹q¸£¸ê®Æ§¨¤¤¡A¦³¡uWin98_se(C:)¡vª«¥ó¡A¥¦¨ä¹ê¬OµwºÐ¡A¦b´ß¼h©R¦WªÅ¶¡¤¤¡A¤]¬O¸ê®Æ§¨¡C¦b¡uWin98_se(C:)¡v¸ê®Æ§¨¤º¡A´N¬O DOS ªºÀɮשR¦W¨t²Î¤¤ªº¦U¥Ø¿ý»PÀɮסC
¦b´ß¼h©R¦WªÅ¶¡¤¤¡A¦pªGn¨Ï¥ÎÀɮשθê®Æ§¨¤§«e¡A¥²¶·¥ý§ä¨ì¤èªkÃѧO¡C¹ï©ó¤£¬OµêÀÀª«¥óªºÀɮסB¥Ø¿ýµ¥¡AÁöµM¥i¥H¥Î¥ÑºÏºÐ¾÷¦WºÙ¶}©l¡A¨Ì§Ç¬O¸ô®|¦W¡BÀɮצWºÙ¡A³o¼Ëªº§¹¾ãÀɦW¨Óªí¥Ü¡F¥i¬O¹ï©óµêÀÀª«¥ó¡A´NµLªk¨Ï¥Î«ez¤è¦¡ªí¥Ü¡CWindows ´£¨Ñ¤F¥t¤@ºØ¤è¦¡¡A¤£¶È¯àªí¥ÜµêÀÀª«¥ó¡A«DµêÀÀª«¥ó¤]¯à¾A¥Î¡C¦b¤¶²Ð³oºØ¤è¦¡¤§«e¡A±o¥ý¤¶²Ð SHITEMID µ²ºcÅé¡A³oÓµ²ºcÅéºÙ¬°¶µ¥ØÃѧO½X¡]item ID¡^¡CSHITEMID ¥u¦³¨âÓÄæ¦ì¡G
SHITEMID STRUCT cb WORD ? abID BYTE ? DUP (?) SHITEMID ENDS
SHITEMID µ²ºcÅé²Ä¤@ÓÄæ¦ì¬O cb¡A«ü©w¤F SHITEMID µ²ºcªº¤j¤p¡A¥H¦ì¤¸²Õ¬°³æ¦ì¡C
²Ä¤GÓÄæ¦ì¬O abID¡A¥¦¬Oª«¥óªºÃѧO½X¡Aªø«×¨Ã¤£©T©w¡A¥Ñª«¥óªº¸ê®Æ§¨¨M©w¡C¥Ñ©ó¸ê®Æ§¨¹ï abID ªºÈ¤À°t¨S¦³²Î¤@¼Ð·Ç¡A¦]¦¹ abID ¶È¹ï¬ÛÃöªº¸ê®Æ§¨¦³·N¸q¡CÀ³¥Îµ{¦¡À³±N¥¦µø¬°¤@Ó°O¸¹¡A¥Î©ó¿ëÃѯS©w¸ê®Æ§¨¤¤ªºª«¥ó¡C
¦b¬YÓ¸ê®Æ§¨¤ºªº¥ô¤@Óª«¥ó¡A³£¦³¿W¤@µL¤Gªº¶µ¥ØÃѧO½X¡C·íµM³Ì®Ú¥»ªº¸`ÂI¬O®à±¡A¥¦¤]¦³¦Û¤vªº¶µ¥ØÃѧO½X¡C°Ñ¾\¹Ï¤¡A¦b®à±¤º¦³¡u§Úªº¹q¸£¡v¡B¡u§Úªº¤å¥ó§¨¡v¡B¡uInternet Explorer¡v¡K¡Kµ¥ª«¥ó¡A¨C¤@Ó³£¦³°ß¤@ªº¶µ¥ØÃѧO½X¡F¦Ó¨ä¤U¼hªº¨CÓ¸ê®Æ§¨»PÀɮסA¤]³£¦p¦¹¡C°²¦pnªí¥Ü¡uEpson EPL-6200L Advanced¡vÀɮתº¸Ü¡A¨º¥²¶·¨Ï¥Î¤@¦êªº¶µ¥ØÃѧO½X¡A¦p¤U¹Ï¤C¡G ¨CÓ¶µ¥ØÃѧO½X³£¥Nªí¤@Ó¸ê®Æ§¨©ÎÀɮסA³Ì¥ªÃ䪺¬O¡u®à±¡vªº¶µ¥ØÃѧO½X¡A¨ä¥k¬O¥Nªí¡u§Úªº¹q¸£¡vªº¶µ¥ØÃѧO½X¡K¡K¤@ª½¨ì¥Nªí¡uEpson EPL-6200L Advanced¡vªº¶µ¥ØÃѧO½X¡A¦Ó³Ì«áªºµ²§À¬O¤@ӪŪº SHITEMID¡C¹³³o¼Ë¡A¥Ñ¤@³s¦êªº¬ÛÃöªº¶µ¥ØÃѧO½Xµ²¦X°_¨Ó¡A¥H¨âÓ 0 ¬°µ²§À¡A¥i¥Hªí¥ÜÀɮשθê®Æ§¨ªº¸ê®Æµ²ºc¡AºÙ¬°¶µ¥ØÃѧO½X¦Cªí¡]item ID lists¡^¡C
¦b³B²z´ß¼h©R¦WªÅ¶¡ªº Win64 API ¦WºÙ¡A¦h¥H SH ¬°°_ÀY¡A¥B±`±`·|¥Î¤@Ó«ü¼Ð¨Óªí¥Ü¶µ¥ØÃѧO½X¦Cªí¦a¦ì§}¡A¤@¯ëºÙ¦¹«ü¼Ð¬° PIDL¡]pointer to an item identifier list¡^¡C
¤Uªí¬° WIN32_FILE_ATTRIBUTE_DATA ªºµ²ºcÅ餤²Ä¤@ÓÄæ¦ì¡AdwFileAttributes¡Aªº»¡©ú¡G
dwFileAttributes | ¼ÆÈ | »¡©ú |
FILE_ATTRIBUTE_READONLY | 1 | °ßŪªºÀɮסCÀ³¥Îµ{¦¡¥i¥HŪ¨úÀɮסA¦ýµLªk¼g¤J©Î§R°£ÀɮסC¥Ø¿ý¤W¤£±µ¨ü³oÓÄÝ©Ê¡C |
FILE_ATTRIBUTE_HIDDEN | 2 | ÁôÂêºÀɮשΥؿý¡C |
FILE_ATTRIBUTE_SYSTEM | 4 | §@·~¨t²Î¨Ï¥Îªº¤@³¡¤À©Î¿W¦û¨Ï¥ÎªºÀɮשΥؿý¡C |
FILE_ATTRIBUTE_DIRECTORY | 10h | ¨ã¦³¦¹Äݩʪº¨Ã«DÀɮסA¦Ó¬O¥Ø¿ý¡C |
FILE_ATTRIBUTE_ARCHIVE | 20h | ¤w³Æ¥÷ªºÀɮשΥؿý¡C·í«Ø¥ß·sÀɮשÎקï¬YÓÀɮסA¨t²Î·|¦Û°Ê³]©w¦¹ÄÝ©Ê¡Aªí¥Ü¦¹Àɮ׬O·sªº©Î¤w§ó§ï¡A»Ýn¶i¦æ³Æ¥÷¡C³Æ¥÷³nÅé·|¨Ï¥Î¦¹ÄݩʨÓÀˬdÀɮ׬O§_©|¥¼³Æ¥÷¡A¦pªGÀɮר㦳¦¹ÄÝ©Ê¡A´N±N¨ä³Æ¥÷¡A«Ý³Æ¥÷§¹¦¨¨Ã¨ú®ø¦¹ÄÝ©Ê¡F¦pªGÀɮפ£¨ã¦¹ÄÝ©Ê¡Aªí¥Ü¸ÓÀɤw³Æ¥÷¹L¤F¡A¥i¥H¸õ¹L¡C |
FILE_ATTRIBUTE_DEVICE | 40h | «O¯dµ¹¨t²Î¨Ï¥Î¡C |
FILE_ATTRIBUTE_NORMAL | 80h | ¥¼³]©w¨ä¥LÄݩʪºÀɮסC¦¹ÄÝ©Ê¥u¦³¦b³æ¿W¨Ï¥Î®É¤~¦³®Ä¡C |
FILE_ATTRIBUTE_TEMPORARY | 100h | ¼È¦sÀÉ¡CÀ³¥Îµ{¦¡«Ø¥ß¦¹ÄݩʪºÀɮ׮ɡA¨t²Î·|¾¨¥i¯à±N¸ê®Æ«O¯d¦b§Ö¨ú°O¾ÐÅ餤¡A¦Ó¤£¼g¤JµwºÐ¡C¦pªGÀ³¥Îµ{¦¡¤£¦A»Ýn¼È¦sÀÉ¡AÀ³Ãö³¬¼È¦sÀÉ«á§R°£¡A«O¯d¦b§Ö¨ú°O¾ÐÅ骺¸ê®Æ¤]¤£·|¼g¤JµwºÐ¡C¦pªGÀ³¥Îµ{¦¡¨S§R°£¼È¦sÀÉ¡A¨º»òÀ³¥Îµ{¦¡µ²§ô«á¡A¨t²Î·|§â¦b§Ö¨ú°O¾ÐÅ骺¸ê®Æ¼g¤J¼È¦sÀÉ¡C |
FILE_ATTRIBUTE_SPARSE_FILE | 200h | ¦¹¬°²¨ÃPÀɮס]sparse file¡^¡C¹³ºÏºÐ¼v¹³ÀÉ¡BµêÀÀ¾÷¾¹¨Ï¥ÎªºµêÀÀºÏºÐµ¥ÀɮסA¥]§t¤j¶q³sÄò¥¼¨Ï¥Îªº°Ï°ì¡A¥i¥H³]¬°²¨ÃPÀɮסC¨t²Î·|°w¹ï¦¹ÃþÀɮ׶i¦æ¯S§OÀx¦s¤è¦¡¡A¼W¥[Àx¦s®Ä¯à¡C |
FILE_ATTRIBUTE_REPARSE_POINT | 400h | ¨ã¦³«·s¤ÀªRÂIªºÀɮשΥؿý¡A©Î¬O²Å¸¹³sµ²ªºÀɮסC |
FILE_ATTRIBUTE_COMPRESSED | 800h | ¨ã¦³¦¹ÄݩʪºÀɮשΤl¥Ø¿ý¡A¨t²Î·|¦Û°Ê¶i¦æÀ£ÁY¡C¹ï©óÀɮסA©Ò¦³¸ê®Æ·|³QÀ£ÁY¡F¹ï©ó¥Ø¿ý¡A·s«ØªºÀɮשM¤l¥Ø¿ý³£·|³QÀ£ÁY¡C |
FILE_ATTRIBUTE_OFFLINE | 1000h | µLªk¥ß§Y¨Ï¥Î¨ã¦³³oºØÄݩʪºÀɮסA¦]¬°¹ê»Ú¤W³oÀɮתº¸ê®ÆÀx¦s¦bÂ÷½uªº¸Ë¸m¤W¡C³q±`«Ü¤[¥¼´¿¨Ï¥Îªº¤jÀɮסA¨ä¸ê®Æ·|³Q¨t²Î·h²¾¦ÜºÏ±a¾÷©Î¶³ºÝµ¥¤j®e¶qÀx¦s¸Ë¸m¡A¨Ã¼Ð¥Ü¦¹Àɮ׬° FILE_ATTRIBUTE_OFFLINE¡A¦pªG¦³À³¥Îµ{¦¡¦s¨ú¥¦¡A¨t²Î·|´£¥Ü¡uÀÉ®×¥¿¦b±qÂ÷½u¦sÀx«ì´_¡vµ¥¦r¼Ë¡CÀ³¥Îµ{¦¡¤£À³ÀH·NÅܧó¦¹ÄÝ©Ê¡C |
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED | 2000h | ¤º®e¯Á¤ÞªA°È¡]content indexing service¡^¬O Windows ¤¤ªº¤@ºØ¥\¯à¡A³z¹L±½´yÀɮתº¤º®e»PÄÝ©Ê¡A«Ø¥ß¯Á¤Þ¥H¥[³t·j´M¾Þ§@¡C¨Ò¦p¡A·í¨Ï¥ÎªÌ¦bÀÉ®×Á`ºÞ¤¤·j´MÀɮצWºÙ©Î¤º®e®É¡A¯Á¤Þ¥iÅãµÛÁYµu·j´M®É¶¡¡C¦Ó¨ã¦³¦¹ÄݩʪºÀɮשΥؿý¡A«ü¥Ü§@·~¨t²Î¸õ¹L¸ÓÀɮשΥؿýªº¯Á¤Þ¹Lµ{¡C³q±`¼È¦sÀɤ£»Ý¯Á¤Þ¥HÁ׺¡¼W¥[t¾á¡A§t¦³±Ó·P¸ê®ÆªºÀɮפ]À³ÁקK¯Ç¤J¯Á¤Þ¡C¦¹Äݩʤ£·|ªý¤îÀɮצWºÙªº·j´M¡A¶È¼vÅTÀɮפº®eªº¯Á¤Þ¡C |
FILE_ATTRIBUTE_ENCRYPTED | 4000h | ¥[±KªºÀɮשΥؿý¡C¹ï©óÀɮסAÀɮפ¤ªº©Ò¦³¸ê®Æ¬y§¡¤w¥[±K¡F¹ï©ó¥Ø¿ý¡A·s«ØªºÀÉ®×»P¤l¥Ø¿ý¹w³]¬°¥[±K¡C¥u¯à¦b NTFS Àɮרt²Î¤W¨Ï¥Î¡A¦pªG±N¥[±KªºÀɮ׽ƻs¨ì¤£¤ä´©¥[±KªºÀɮרt²Î¡A¨Ò¦p FAT32¡A¨º»ò¥[±KÄݩʱN¿ò¥¢¡C¦¹Äݩʤ£¯à¦P®É»P FILE_ATTRIBUTE_COMPRESSED ¦@¦s¡C |
FILE_ATTRIBUTE_INTEGRITY_STREAM | 8000h | §¹¾ã©Ê¸ê®Æ¬y¬O Resilient File System¡]ReFS¡A¥i¾aÀɮרt²Î¡^ªº¤@¶µ¥\¯à¡A¥¦¨Ï¥ÎÀˬd½X¨ÓÅçÃÒÀɮשΥؿýªº¸ê®Æ§¹¾ã©Ê¡A½T«O¦b¦s¨ú®ÉÀË´ú¨Ã×´_¸ê®Æ·lÃa¡]¨Ò¦p¥Ñ©óµwÅé¿ù»~¤Þ°_ªº°ÝÃD¡^¡C¥u¦³¦b Windows 10 ©Î Windows Server 2012 R2 ¤Î¤§«áªº§@·~¨t²Î¤~¯à§ó§¹µ½ªº¤ä´© ReFS¡C¨ã¦³¦¹Äݩʪº¥Ø¿ý»P¨Ï¥ÎªÌ¸ê®Æ¬y¡]user data stream¡A¥]§tÀɮתº¥Dn¤º®e»Pªþ¥[ªº¸ê®Æ¤º®e¡^³£·|¨ü¨ì®ÕÅç«OÅ@¡A½T«O¸ê®Æ¦b¦s¨ú©Î¶Ç¿é¹Lµ{¤¤¤£³Q·lÃa¡C |
FILE_ATTRIBUTE_VIRTUAL | 10000h | «O¯dµ¹¨t²Î¨Ï¥Î¡C |
FILE_ATTRIBUTE_NO_SCRUB_DATA | 20000h | ¤£ÅýI´º¸ê®Æ§¹¾ã©Ê±½´y¾¹¡]§Y Scrubber¡^Ū¨ú¨Ï¥ÎªÌ¸ê®Æ¬y¡C¨ã¦³¦¹Äݩʪº¥Ø¿ý¡A¶È¦³Ä~©Ó¥\¯à¡C¦¹ÄݩʶȦb Storage Spaces ©M ReFS ¤ä´©¡A¥B¤£¥]§t©ó´¶³qªº¥Ø¿ý¦Cªí¤¤¡CScrubber ¬O¤@ºØI´ºµ{¦¡¡A±M¬° ReFS ©M Storage Spaces ³]p¡A¥Î©ó©w´ÁÀˬd©M×´_Àɮרt²Î¤¤ªº¸ê®Æ§¹¾ã©Ê°ÝÃD¡A¦¹¹Lµ{³q±`¦bI´º¤¤¹B¦æ¡A¹ï¨t²Î©Ê¯à¦³¤@©w¼vÅT¡CWindows 8 ©Î Windows Server 2012 ¤Î¤§«áªº§@·~¨t²Î¤~¤ä´©¦¹ÄÝ©Ê¡C |
FILE_ATTRIBUTE_EA | 40000h | ¨ã¦³ÂX¥RÄݩʪºÀɮשΥؿý¡A¶È¨Ñ¨t²Î¤º³¡¨Ï¥Î¥B«Ü¤Ö¨Ï¥Î¡C |
FILE_ATTRIBUTE_RECALL_ON_OPEN | 40000h | ¦¹ÄݩʶȥX²{¦b¥Ø¿ý¦CÁ|Ãþ«¬¡]¦p FILE_DIRECTORY_INFORMATION¡BFILE_BOTH_DIR_INFORMATION µ¥¡^¤¤¡C¨ã¦³¦¹ÄݩʪºÀɮשΥؿý¡A¦b¥»¾÷¤W¨S¦³§¹¾ãªº¯u¹ê¸ê®Æ¡A¥i¯à¥u¦³ÀɮצWºÙ¡B¤j¤p¡B¤é´Áµ¥¡A¯u¹ê¸ê®Æ³q±`Àx¦s©ó¶³ºÝ¡C¦]¦¹¶}±Ò¦¹ÃþÀɮשΥؿý¡A·|ªá¶O¸ûªø®É¶¡¡C |
FILE_ATTRIBUTE_PINNED | 80000h | ¤À¼h¦sÀx¡]Hierarchical Storage¡^¬O«ü®Ú¾ÚÀɮתº¨Ï¥ÎÀW²v¡B«n©Êµ¥¦]¯À¡A±NÀɮצ۰ʲ¾°Ê¨ì¤£¦P¼h¯Åªº¦sÀx´C¤¶¤¤¡C¨Ò¦p¸g±`¨Ï¥ÎªºÀɮ׫O¯d¦b°ª³t SSD ©Î¥»¾÷ºÏºÐ¤W¡F«Ü¤Ö¨Ï¥ÎÀɮײ¾°Ê¨ì§C¦¨¥»ªº¶³ºÝ©ÎºÏ±a¾÷¤W¡C¨ã¦³¦¹ÄݩʪºÀɮשΥؿý¡A¤À¼h¦sÀx³nÅé·|½T«O¥¦Ì©l²×Àx¦s¦b¥»¾÷¡C |
FILE_ATTRIBUTE_UNPINNED | 100000h | ¨ã¦³¦¹ÄݩʪºÀɮשΥؿý¡A¥u¦³¦b¨Ï¥ÎªÌ¶}±Ò®É¡A¤~¥Ñ»·ºÝ¸ü¤J¡A§_«h¥u¦³³¡¤À¦b¥»¾÷¤W¡C¥u¦³¤À¼h¦sÀxºÞ²z³nÅé¤~»Ýn¨Ï¥Î¦¹ÄÝ©Ê¡C |
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS | 400000h | ¨ã¦³¦¹ÄݩʪºÀɮסA¨ä³¡¤À¸ê®Æ¬°Àx¦s©ó¥»¾÷¡A¨ä¾l¦s©ó»·ºÝ¡F¨ã¦³¦¹Äݩʪº¥Ø¿ý¡A¦³³¡¤ÀÀɮשΤl¥Ø¿ý¦s©ó»·ºÝ¡C³o¨Ç»·ºÝªº¸ê®Æ¥u¦³¦b»Ýn¦s¨ú®É¡A±q»·ºÝ¨ú¦^¡A¦]¦¹·|ªá¶O¸ûªø®É¶¡¡C |