²Ä¤G¤Q¤»³¹¡@³q¥Î¹ï¸Ü²°¡G¶}±ÒÂÂÀÉ¡]¤@¡^

Windows §@·~¨t²Î´£¨Ñ¤@¨Ç¤w¸g³]­p¦nªº¹ï¸Ü²°¥i¨Ñµ{¦¡³]­p®vª½±µ¨Ï¥Î¡AºÙ¬°³q¥Î¹ï¸Ü²°¡]common dialog boxes¡^¡A¥¦¤£»Ý­n¹³«e´X³¹ªº¹ï¸Ü²°¡A­n¥ý¦b¦b¸ê·½´y­zÀɤ¤¥Î DIALOG ©Î DIALOGEX °Ï¶ô©w¸q¡AµM«á¥Î¸ê·½½sĶ¾¹½sĶ¡A©Ò±o¨ìªº¸ê·½ÀɦA¥Î³sµ²¾¹»P¥ØªºÀɳsµ²¡F³q¥Î¹ï¸Ü²°¥u»Ý©I¥s¤Uªí¤¤ªº Win64 API §Y¥i²£¥Í¡A·íµM¦b©I¥s³o¨Ç Win64 API ¤§«e¥²¶·±N°Ñ¼Æ³]©w¦n¡A¦Ó³o¨Ç°Ñ¼Æ³£¬O½ÆÂøªºµ²ºcÅé¡C±`¨£ªº³q¥Î¹ï¸Ü²°¦³¤U­±´XºØ¡G

³q¥Î¹ï¸Ü²°­n©I¥sªº API­n¨Ï¥Îµ²ºcÅé
³]©wÃC¦âChooseColorCHOOSECOLOR
·j´MFindTextFINDREPLACE
¨ú¥NReplaceTextFINDREPLACE
³]©w¦r«¬ChooseFontCHOOSEFONT
¶}±ÒÂÂÀÉGetOpenFileNameOPENFILENAME
¥t¦s·sÀÉGetSaveFileNameOPENFILENAME
ª©­±³]©wPageSetupDlgPAGESETUPDLG
¿ï¾Ü¥Ø¿ýSHBrowseForFolderBROWSEINFO

¨Ò¦p­n²£¥Í¡u¶}±ÒÂÂÀÉ¡v³q¥Î¹ï¸Ü²°¡A»Ý¥ý³]©w¦n OPENFILENAME µ²ºcÅ骺­ÓÄæ¦ì¡AµM«á©I¥s GetOpenFileName API¡CÁöµM³q¥Î¹ï¸Ü²°ªººØÃþ«Ü¦h¡A¦ý³o¤@³¹¥uµÛ­«¦b¡u¶}±ÒÂÂÀÉ¡v³q¥Î¹ï¸Ü²°¡C


¶}±ÒÂÂÀɳq¥Î¹ï¸Ü²°

ÅU¦W«ä¸q¡A¶}±ÒÂÂÀɳq¥Î¹ï¸Ü²°¬O¥Î©ó¨ú±oÀɮצWºÙªº¹ï¸Ü²°¡C®Ú¾Ú¦b OPENFILENAME ¤¤¤£¦Pªº³]©w¡A¥¦ªº°õ¦æµe­±¦³¦hºØ¤£¦Pªº¼Ë¤l¡A¦ý¬O¥D­n¥i¤À¬°¨âÃþ¡G­·®æ¡]old-style¡A¥ç½Ķ¦¨Â¼˦¡¡^»PÁ`ºÞ­·®æ¡]explorer-style¡A¤]½Ķ¦¨Á`ºÞ¼Ë¦¡¡B±´ÀIªÌ¼Ë¦¡µ¥¡^¡C¤U¹Ï¬O¦b Windows 7 §@·~¨t²Î²£¥Íªº¶}
±ÒÂÂÀɹï¸Ü²°¡A¨âªÌ³£¬O©I¥s GetOpenFileName ²£
¥Íªº¡A¹Ï¤@¬O­·®æ¡A¹Ï¤G¬OÁ`ºÞ­·®æ¡C¨Ï¥ÎªÌ¥i¥H¥Î·Æ¹«¥ªÁä¦bÀɮצCªí¤¤¿ï¾ÜÀɮסA¨£¤W­±¨â¹Ï¤¤·Æ¹«´å¼Ð¿ï©wªº¡u97f1logu00.bmp¡vÀɮסA¸ÓÀɮתº¦WºÙ·|¥X²{¦b¡uÀɦW¡]N¡^¡G¡v©Î¡uÀɮצWºÙ¡]N¡^¡G¡v¤§«áªº½s¿è®Ø¤º¡]¬õ¦â®Ø¡^¡AµM«á«ö¤U¡u½T©w¡v©Î¡u¶}±Ò¡v«ö¶s¡A´N¯àÀò±o©Ò¿ï¾ÜªºÀɮצWºÙ¡A¦bÀ³¥Îµ{¦¡ùØ­±¥i¥H§@¬°«áÄò³B²zªº¸ê®Æ¡A«Ü¤è«K¦Ó¥B©ö©ó¨Ï¥Î¡C©³¤U¤¶²Ð GetOpenFileName API¡C

GetOpenFileName API

GetOpenFileName ªº­ì«¬¦p¤U¡G

invoke  GetOpenFileName,\
        lpofn           ; address of structure with initialization data

¥¦¥u¦³¤@­Ó°Ñ¼Æ¡AOPENFILENAME µ²ºcÅ骺¦ì§}¡C©I¥s GetOpenFileName ¤§«e¡A¶·³]©w¦n¦¹µ²ºcÅ骺Äæ¦ì¡AGetOpenFileName ¥Ñ¦¹µ²ºcÅéÀò±o©Ò»Ý¸ê®Æ¡A¨Ã§â¥t¥~¤@¨Ç¸ê®ÆÂǥѦ¹µ²ºcÅé¡A¶Ç¦^µ¹À³¥Îµ{¦¡¡A¨Ñ¨ä¨Ï¥Î¡C

¦pªG¨Ï¥ÎªÌ¦³¿ï©w¬Y­ÓÀɮסA¥B«ö¤U¡u½T©w¡v©Î¡u¶}±Ò¡v«ö¶s¡A¦^¶Ç­È¬°«D¹s¡A¥B OPENFILENAME ªº lpstrFile Äæ¦ì©Ò«ü¦ì§}¤W¦s¦³¥]§tºÏºÐ¾÷¦WºÙ¡B¸ô®|¦Wªº§¹¾ãÀɮצWºÙ¡C¦pªG¨Ï¥ÎªÌ«ö¤U¡u¨ú®ø¡v«ö¶s©Î«ö¤U¥k¤W¨¤ªºÃö³¬«ö¶s¡A¦^¶Ç­È¬°¹s¡A¥i©I¥s CommDlgExtendedError Àò±o¶i¤@¨Bªº¿ù»~°T®§¡C

OPENFILENAME µ²ºcÅé

OPENFILENAME µ²ºcÅé¶È¥Î©ó©I¥s GetOpenFileName »P GetSaveFileName ¨â­Ó Win64 API ªº°Ñ¼Æ¡A«eªÌ·|¼u¥X¡u¶}±ÒÂÂÀÉ¡v¹ï¸Ü²°¡A«áªÌ·|¼u¥X¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°¡C¦b WinInc ªº COMMDLG.INC §t¤JÀɤ¤¡AOPENFILENAME ªº©w¸q¦³¿ù¡A¥²¶·­n¦³¹ï»ô­È¡A¦b STRUCT ¤§«á¥²¶·¥[¤W¹ï»ô­È 8¡A´N¦p¦P©³¤U OPENFILENAME ©Ò©w¸qªº¼Ë¤l¡G

OPENFILENAME        STRUCT    8
  lStructSize       DWORD     ?  ;OPENFILENAMEµ²ºcÅéªø«×
  hwndOwner         HWND      ?  ;¾Ö¦³¦¹¹ï¸Ü²°ªºµøµ¡¥N½X
  hInstance         HINSTANCE ?  ;¼Ò²Õ¥N½X
  lpstrFilter       LPWSTR    ?  ;¿z¿ï¦r¦ê¦ì§}
  lpstrCustomFilter LPWSTR    ?  ;¦Û¦æ©w¸qªº¿z¿ï¦r¦ê¦ì§}
  nMaxCustFilter    DWORD     ?  ;lpstrCustomFilter©Ò«ü½w½Ä°Ï¤j¤p
  nFilterIndex      DWORD     ?  ;¹w³]ªº¿z¿ï¦r¦ê
  lpstrFile         LPWSTR    ?  ;¦s©ñ§¹¾ãÀɦWªº½w½Ä°Ï¦ì§}
  nMaxFile          DWORD     ?  ;lpstrFile©Ò«ü½w½Ä°Ï¤j¤p
  lpstrFileTitle    LPWSTR    ?  ;ÀɦW¦ì§}
  nMaxFileTitle     DWORD     ?  ;lpstrFileTitle©Ò«ü½w½Ä°Ï¤j¤p
  lpstrInitialDir   LPWSTR    ?  ;ªì©l¥Ø¿ý¦ì§}
  lpstrTitle        LPWSTR    ?  ;¼ÐÃDÄæ¦r¦êªº¦ì§}
  Flags             DWORD     ?  ;ºX¼Ð
  nFileOffset       WORD      ?  ;ÀɦW¦b§¹¾ãÀɦWªº²Ä´X­Ó¦r¤¸
  nFileExtension    WORD      ?  ;°ÆÀɦW¦b§¹¾ãÀɦWªº²Ä´X­Ó¦r¤¸
  lpstrDefExt       LPWSTR    ?  ;¹w³]°ÆÀɦW¦ì§}
  lCustData         LPARAM    ?  ;¶Çµ¹ÄdºI¨ç¦¡¦Û¦æ©w¸qªº¸ê®Æ
  lpfnHook          QWORD     ?  ;ÄdºI¨ç¦¡¦ì§}
  lpTemplateName    LPWSTR    ?  ;¹ï¸Ü²°­±ªO¦WºÙªº¦ì§}
 IF (_WIN32_WINNT GE 500h)       ;Windowsª©¥»NT 5.0¤Î¨ä¥H«áª©¥»¤~¦³ªºÄæ¦ì
  pvReserved        DWORD     ?  ;«O¯dªºÄæ¦ì¡AÀ³³]¬°0
  dwReserved        DWORD     ?  ;«O¯dªºÄæ¦ì¡AÀ³³]¬°0
  FlagsEx           DWORD     ?  ;ÂX¥RªººX¼Ð
 ENDIF
OPENFILENAME        ENDS

OPENFILENAME µ²ºcÅ骺Äæ¦ì«Ü¦h¡A©³¤U²²¤¤¶²Ð¡G

①¡BlStructSize¡GOPENFILENAME µ²ºcÅéªø«×¡A¥H¦ì¤¸²Õ¬°³æ¦ì¡CWindows API ·|ÀHµÛ§@·~¨t²Îª©¥»¤É¯Å¦Ó²K¥[·sªºÄæ¦ì¦Ó¼W¥[·sªº¥\¯à¡A¦ý¤S­n¬Û®e¦³ªºÀ³¥Îµ{¦¡¡CÂÇ¥Ñ lStructSize¡AWindows ¥i¥H§PÂ_À³¥Îµ{¦¡¨Ï¥Î­þ­Óª©¥»¡A¦Ó¹F¨ì¬Û®eªº¥Øªº¡C
②¡BhwndOwner¡G¾Ö¦³¦¹¹ï¸Ü²°ªºµøµ¡¤§µøµ¡¥N½X¡A¦pªG¨S¦³µøµ¡¾Ö¦³¦¹¹ï¸Ü²°¡A¥i±N¦¹Äæ¦ì³]¬° 0¡C
③¡BhInstance¡G¦³¤TºØ±¡§Î¡A»P¦b Flags Äæ¦ì¤¤¡AOFN_ENABLETEMPLATEE »P OFN_ENABLETEMPLATEHANDL ¨âºX¦³Ãö¡A³o¨â­ÓºX¼Ð¶·¾Ü¤@³]©w¡A©Î¬O³£¤£³]©w¡G
⑴¡B¦pªG Flags ¤¤³]©w¤F OFN_ENABLETEMPLATE¡A¨º»ò hInstance ¬O¼Ò²Õ¥N½X¡A¥B¦¹¼Ò²Õ¥N½X§t¦³ lpTemplateName ©Ò«ü¦ì§}ªº¹ï¸Ü²°­±ªO¡C
⑵¡B¦pªG Flags ¤¤³]©w¤F OFN_ENABLETEMPLATEHANDLE¡AhInstance ¬O¥]§t¹ï¸Ü²°­±ªOªº°O¾ÐÅ骫¥ó¥N½X¡C
⑶¡B¦pªG Flags ¤£§t OFN_ENABLETEMPLATEHANDLE¡A¤]¤£§t OFN_ENABLETEMPLATE¡A¨t²Î·|©¿²¤ hInstance¡C
④¡BlpstrFilter¡G¿z¿ï¦r¦êªº¦ì§}¡A¥i¥H¥]§t¤@²Õ©Î¤@²Õ¥H¤Wªº¿z¿ï¦r¦ê¡A¨C²Õ¿z¿ï¦r¦ê³£¬O¥Ñ¤@¹ï¥H¹sµ²§Àªº¦r¦ê²Õ¦¨¡F³Ì«á¤@²Õ¿z¿ï¦r¦ê«á­±¡A­n¥H¨â­Ó¹sªí¥Üµ²§ô¡C¿z¿ï¦r¦ê¥Ñ¤@¹ï¦r¦ê²Õ¦¨¡G
⑴¡B²Ä¤@­Ó¦r¦ê¬°Åã¥Ü¦r¦ê¡]display string¡^¡A¥Î©óÅã¥Ü¦b¡uÀÉ®×Ãþ«¬¡vªº¤U©Ô¦¡¤è¶ô±±¨î¶µ¤º¡]¨Ò¦p¡A¦b¹Ï¤@©Î¹Ï¤Gªº¡u¦ì¤¸¹Ï(*.bmp)¡v¡AÂŦâ®Ø¡^¡C
⑵¡B²Ä¤G­Ó¦r¦ê¬°¿z¿ï§Î¦¡¦r¦ê¡]filter pattern¡^¡A«ü©w¿z¿ï³W«h¡A²Å¦X¿z¿ï³W«hªºÀÉ®×·|¦C¦b¹ï¸Ü²°¤¤ªº²M³æ²°±±¨î¶µ¤º¡]list box control¡A¦b¹Ï¤@©Î¹Ï¤Gªºµµ¦â®Ø¡^¡C¿z¿ï³W«h³q±`¬O«ü©w¬Y¤@ºØÃþ«¬ªºÀɮסA¦ÓÀÉ®×Ãþ«¬¥Ñ°ÆÀɦW¨M©w¡C¨Ò¦p°ÆÀɦW¬O¡u.BMP¡v´N¥Nªí¦ì¤¸¹Ï¡A¡u.TXT¡v¥Nªí¯Â¤å¦rÀÉ¡A©Ò¥H¿z¿ï§Î¦¡¦r¦ê´N¹³¡u"*.BMP",0¡v©Î¡u"*.TXT",0¡vªº¼Ë¤l¡C¡]¦¹³B°ÆÀɦWªº¤j¤p¼g¤£©ë¡Aµø¬°¬Û¦P¡C¡u*¡v¥Nªí¸U¥Î¦r¤¸¡Aªí¥Ü¥ô·N¦r¤¸¡A¦P®É¥i¥H¬O¤@­Ó¥ô·N¦r¤¸¡B¤]¥i¥H¬O¨â­Ó¡B¤T­Ó¡K¡K¡A¤]´N¬O»¡ 9.bmp¡B95can05.bmp ³£²Å¦X *.BMP ¿z¿ï³W«h¡^
©³¤U¨Ó¬Ý´X­Ó¨Ò¤l¡C°²¦p¦b¶}±ÒÂÂÀɹï¸Ü²°­n¬D¿ï¬Y­Ó¦ì¤¸¹ÏÀɮסA¨º»òÀ³¸Ó¦b¹ï¸Ü²°ªºÀɮצCªí¤¤¦C¥X©Ò¦³¦ì¤¸¹ÏÀɮסA©Ò¥H¿z¿ï¦r¦ê¥u¦³¤@²Õ¡A¦p¤U¡G
"¦ì¤¸¹Ï",0,"*.BMP",0,0
°²¦p­n¦b¶}±ÒÂÂÀɹï¸Ü²°­n¬D¿ï¦ì¤¸¹Ï©ÎªÌ¥t¤@ºØ±`¨£ªºÀ£ÁY¹Ï¤ùÀÉ¡u.JPG¡v¡A¨º»ò¿z¿ï¦r¦ê´N¦³¨â²Õ¡C¦Ó JPG Àɪº°ÆÀɦW¥i¥H¬O¡u.JPG¡v¤]¥i¥H¬O¡u.JPEG¡v¡A¹³³o¼Ë¤@­ÓÅã¥Ü¦r¦ê·f°t¦h­Ó¿z¿ï§Î¦¡¦r¦ê®É¡A¥i¥H¥Î¤À¸¹¡];¡^¨Ó¤À¹j¥¦­Ì¡A¦p¤U¡G
"¦ì¤¸¹Ï",0,".BMP",0
"À£ÁY¹ÏÀÉ",0,"*.JPG;*.JPEG",0,0
¿z¿ï§Î¦¡¦r¦ê¤]¥i¥H¥Ñ¦³®ÄªºÀɦW¦r¤¸©M¸U¥Î¦r¤¸¡u*¡v²Õ¦¨¡A¦ý¤£¥i¨Ï¥ÎªÅ®æ¡C¨Ò¦p©³¤Uªº¨Ò¤l¥u·|¦b²M³æ²°±±¨î¶µ¤ºÅã¥Ü¥H¡u9¡v¶}ÀYªº BMP ÀɮסG
"ÀɦW¬° 9 °_ÀYªº¦ì¤¸¹Ï",0,"9*.BMP",0,0
¦b¤U©Ô¦¡¤è¶ô±±¨î¶µÅã¥ÜªºÅã¥Ü¦r¦ê¶¶§Ç¡A¬O«ö·Ó lpstrFilter ¤¤«ü©wªº¶¶§Ç¡C¦pªG lpstrFilter ¬° NULL¡A«h¹ï¸Ü²°¤£·|Åã¥Ü¥ô¦óÅã¥Ü¦r¦ê¡A¦Ó²M³æ²°±±¨î¶µ·|Åã¥Üªì©l¥Ø¿ý¤ºªº©Ò¦³ÀɮסC
⑤¡BlpstrCustomFilter¡G¦Û¦æ©w¸qªº¿z¿ï¦r¦ê¦ì§}¡A¥]§t¤@¹ïÅã¥Ü¦r¦ê»P¿z¿ï§Î¦¡¦r¦ê¡A¤¤¶¡¥H¹s¹j¶}¡A³Ì«á¥H¨â­Ó¹s¬°µ²§À¡CÀ³¥Îµ{¦¡­º¦¸«Ø¥ß¹ï¸Ü²°®É¡A¦pªG«ü©w lpstrCustomFilter ¬°Åã¥Ü¦r¦ê¦ì§}¡A¥BÅã¥Ü¦r¦ê¨Ã«DªÅ¦r¦ê¡A¨º»ò·í¨Ï¥ÎªÌ¿ï¨úÀɮ׮ɡA¹ï¸Ü²°·|±N¥Ø«eªº¿z¿ï§Î¦¡½Æ»s¨ì¿z¿ï§Î¦¡¦r¦ê¤¤¡C¦b¤U¦¸«Ø¥ß¹ï¸Ü²°®É¡A¨t²Î·|¨Ï¥Î lpstrCustomFilter «ü©wªº¿z¿ï¦r¦ê¡C¦pªG nFilterIndex ¬°¹s¡A¹ï¸Ü²°·|¨Ï¥Î¦Û­q¿z¿ï¡C
¦pªG lpstrCustomFilter ¤£¬O¹s¡A¥²¶·«ü©w nMaxCustFilter ªº­È¬° lpstrCustomFilter ½w½Ä°Ïªº¤j¤p¡A¥H¦r¤¸¬°³æ¦ì¡F¦pªG¬O¹s¡A¹ï¸Ü²°´N¤£·|«O¯d¨Ï¥ÎªÌ¦Û¦æ©w¸qªº¿z¿ï¦r¦ê¡C
⑥¡BnMaxCustFilter¡GlpstrCustomFilter ©Ò«üªº½w½Ä°Ï¤j¤p¡A¥H¦r¤¸¬°³æ¦ì¡A¦Ü¤Ö»Ý 40 ¦r¤¸¡C¦pªG lpstrCustomFilter ¬°¹s¡A©Î©Ò«ü¦ì§}ªº²Ä¤@­Ó¦r¤¸¬°¹s¡A¨t²Î·|©¿²¤ nMaxCustFilter¡C
⑦¡BnFilterIndex¡GnFilterIndex ªº¼Æ­È¥i¥H¬O 1¡B2¡K¡K¨ì lpstrFilter ¤º¦³¦h¤Ö²Õ¿z¿ï¦r¦ê¡A¤]´N¬O¿z¿ïªº¯Á¤Þ¡C³o¯Á¤Þ­È©Ò¥NªíªºÅã¥Ü¦r¦ê·|Åã¥Ü©ó¤U©Ô²M³æ«¬½Æ¦X®Ø©ÎÀÉ®×Ãþ«¬±±¨î¶µ®Çªº½s¿è®Ø¤º¡C¨Ò¦p¦b lpstrFilter ©Ò«ü¦ì§}¬O
"²Õ¦X»y¨¥",0,"*.ASM",0
"¶W¤å¥»¼Ð°O»y¨¥",0,"*.HTML;*.HTM",0
"C»y¨¥",0,"*.C",0,0
¦Ó nFilterIndex ³]¬° 1¡A¨º»òµe­±¦p¥k¹Ï¤T¡C
⑧¡BlpstrFile¡G¦s©ñ§¹¾ãÀɦWªº½w½Ä°Ï¦ì§}¡C©I¥s GetOpenFileName ©Î GetSaveFileName¡A¨Ï¥ÎªÌ¬D¿ï¦nÀɮר樥\ªð¦^®É¡A¦¹½w½Ä°Ï·|¦s©ñ§¹¾ãÀɦW¡A§¹¾ãÀɦW¥]§tºÏºÐ¾÷¦WºÙ¡B¸ô®|¦W¡B¥DÀɦW¤Î°ÆÀɦW¡C¦¹½w½Ä°Ï¥ç¥i¦s©ñªì©lÀɦW¡A§@ªk¬O¦b©I¥s«e¡A§â¥H¹sµ²§ÀªºÀɮצWºÙ¶ñ¤J¦¹½w½Ä°Ï§Y¥i¡F¦pªG¤£¶·ªì©lÀɦW¡A½w½Ä°Ï²Ä¤@­Ó¦r¤¸¥²¶·¬O¹s¡Cªì©lÀɦW·|Åã¥Ü¦b¡uÀɦW¡v©Î¡uÀɮצWºÙ¡v¥kÃ䪺½Æ¦X®Ø¤º¡C
¦pªG¤w³]©w OFN_ALLOWMULTISELECT ºX¼Ð¡A¥B¨Ï¥ÎªÌ¬D¿ï¦h­ÓÀɮסAGetOpenFileName ©Î GetSaveFileName Win64 API ªð¦^®É¡A½w½Ä°Ï·|¥]§t¥Ø«eªº¸ô®|¦W¡A«á­±±µµÛ¨Ï¥ÎªÌ¿ï©wªº©Ò¦³ÀɦW¡]¶È¥]§t¥DÀɦW¤Î°ÆÀɦW¡^¡C¹ï©óÁ`ºÞ­·®æªº¹ï¸Ü²°¡A¸ô®|¦W»PÀɦW¤§¶¡¥H 0 ¹j¶}¡AÀɦW»PÀɦW¤§¶¡¤]¥H 0 ¹j¶}¡A³Ì«á¤@­ÓÀɦW¤§«á¦³¨â­Ó 0¡Aªí¥Üµ²§ô¡C¹ï©ó­·®æªº¹ï¸Ü²°¡A¸ô®|¦W»PÀɦW¡BÀɦW»PÀɦW¤§¶¡¡A¥HªÅ¥Õ·í¤À¹j²Å¸¹¡A¦Ó¨ã¦³ªÅ¥Õ¦r¤¸ªºÀɦW·|¥HµuÀɦW¡]§Y DOS ªºÀɦW®æ¦¡¡A8 ­Ó¦ì¤¸²Õªº¥DÀɦW¥[¤W 3 ­Ó¦ì¤¸²Õªº°ÆÀɦW¡A´N¬O©Ò¿×ªº 8.3 ®æ¦¡¡^ªí¥Ü¡C°²¦p¦³³]©w OFN_ALLOWMULTISELECT¡A¦ý¨Ï¥ÎªÌ¶È¿ï©w¤@­ÓÀɮסA¨º¸ô®|¦W»PÀɦW¤§¶¡¤£·|¦³ 0 ©ÎªÅ¥Õ¤À¹j²Å¸¹¡C
¦pªG½w½Ä°Ï¤Ó¤p¡A¦^¶Ç­È¬°¹s¡A©I¥s CommDlgExtendedError ·|¶Ç¦^ FNERR_BUFFERTOOSMALL¡C¦b¦¹±¡ªp¤U¡AlpstrFile ½w½Ä°Ïªº²Ä¤@­Ó¦r²Õ¬O©Ò»Ýªº¤j¤p¡A¥H¦r¤¸¬°³æ¦ì¡C
⑨¡BnMaxFile¡GlpstrFile ©Ò«ü¤§½w½Ä°Ï¤j¤p¡A¥H¦r¤¸¬°³æ¦ì¡C½w½Ä°Ï¥²¶·°÷¤j¡A¤~¯àÀx¦s¸ô®|©MÀɮצWºÙ¡A¥]¬A²×¤îªº Null ¦r¤¸¡C¦pªG½w½Ä°Ï¤Ó¤p¦ÓµLªk¥]§tÀɮ׸ê°T¡AGetOpenFileName ©M GetSaveFileName ·|¶Ç¦^¹s¡C½w½Ä°Ïªø«×¦Ü¤ÖÀ³¬° 256 ­Ó¦r¤¸¡C
⑩¡BlpstrFileTitle¡GÀɦW¦ì§}¡C·í©I¥s GetOpenFileName ©Î GetSaveFileName¡A¨Ï¥ÎªÌ¥Ñ¹ï¸Ü²°¤¤¿ï©w¦nÀɮר樥\ªð¦^®É¡A¨t²Î·|§â¸ÓÀɮתºÀɦW¦s©ó¦¹Äæ¦ì©Ò«ü¦ì§}ªº½w½Ä°Ï¤º¡A¦¹ÀɦW¤£§t¸ô®|¡A¶È¥]§t¥DÀɦW»P°ÆÀɦW¡C¦pªG¤£»Ý­n³o¶µ¸ê®Æ¡A¤]¥i¥H§â¦¹Äæ³]¬°¹s¡C
⑪¡BnMaxFileTitle¡GlpstrFileTitle ©Ò«ü½w½Ä°Ï¤j¤p¡A³æ¦ì¬°¦r¤¸¡C¦pªG lpstrFileTitle ³]¬°¹s¡A¨t²Î·|©¿²¤¦¹Äæ¦ì¡C
⑫¡BlpstrInitialDir¡Gªì©l¥Ø¿ý¦ì§}¡A¦¹¦ì§}«ü¦V¥H¹sµ²§Àªº¥Ø¿ý¦WºÙ¡A³o­Ó¥Ø¿ý¥i¥H¬Oµ´¹ï¸ô®|©Î¬Û¹ï¸ô®|¡C·í²£¥Í¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°®É¡A¹ï¸Ü²°¤¤ªº²M³æ²°±±¨î¶µ¡]¦b¹Ï¤@©Î¹Ï¤Gªºµµ¦â®Ø¡^©Î¹Ï¤Tªº¡u¸ê®Æ§¨¡v´N¬O lpstrInitialDir ©Ò«üªº¥Ø¿ý¡C¸ÜÁö¦p¦¹¡A¦ý¹ê»Ú¤W¬°¤F¾Þ§@«K§Q©Ê¡AlpstrInitialDir ·|¨Ì¾Ú¤£¦P§@·~¨t²Î¦Ó¹ïªì©l¥Ø¿ýªº³]©w¦³¤£¦Pªºµ¦²¤¡G
⑴¡BWindows 3.x »P Windows NT 3.x¡G
⒜¡B¦pªG lpstrInitialDir ¤w«ü©w¥Ø¿ý¡Aªì©l¥Ø¿ý§Y¬° lpstrInitialDir ©Ò«üªº¥Ø¿ý¡C
⒝¡B¦pªG lpstrInitialDir ¬°¹s¡A¦Ó lpstrFile ©Ò«ü¦r¦ê¥]§t¸ô®|¡A¨º»òªì©l¥Ø¿ý¬° lpstrFile ©Ò«üªº¸ô®|¡C
⒞¡B¦pªG³£¤£²Å¦X¤W­z±ø¥ó¡Aªì©l¥Ø¿ý¬°·í«e¥Ø¿ý¡]§YÀ³¥Îµ{¦¡©Ò¦b¥Ø¿ý¡^¡C
⑵¡BWindows 98/Me¡G
⒜¡B¦pªG lpstrInitialDir ¤w«ü©w¥Ø¿ý¡Aªì©l¥Ø¿ý§Y¬° lpstrInitialDir ©Ò«üªº¥Ø¿ý¡C
⒝¡B¦pªG lpstrInitialDir ¬°¹s¡A¦Ó lpstrFile ©Ò«ü¦r¦ê¥]§t¸ô®|¡A¨º»òªì©l¥Ø¿ý¬° lpstrFile ©Ò«üªº¸ô®|¡C
⒞¡B¦pªG lpstrInitialDir ¬°¹s¡A¦Ó lpstrFile ©Ò«ü¦r¦ê¤£¥]§t¸ô®|¡A¦ý¬O·í«e¥Ø¿ý§t¦³²Å¦X lpstrFilter ©Ò«ü©w¿z¿ï§Î¦¡ªºÀɮסA¨º»òªì©l¥Ø¿ý¬°·í«e¥Ø¿ý¡C
⒟¡B§_«hªì©l¥Ø¿ý¬°¡u§Úªº¤å¥ó§¨¡v¡A§Y¡uC:\My Documents\¡v¡C
⑶¡BWindows XP/2000¡G
⒜¡B¦pªG lpstrFile ©Ò«ü©w¦r¦ê¥]§t¸ô®|¡A¨º»òªì©l¥Ø¿ý§Y¬°¸Ó¸ô®|¡C
⒝¡B¦pªG lpstrFile ©Ò«ü©w¦r¦ê¤£§t¸ô®|¡Aªì©l¥Ø¿ý§Y¬° lpstrInitialDir ©Ò«üªº¥Ø¿ý¡C
⒞¡B¦pªG lpstrInitialDir ¬°¹s¡A¦ÓÀ³¥Îµ{¦¡¤§«e´¿¨Ï¥Î¹L¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°¡A¨º»òªì©l¥Ø¿ý¬O³Ìªñ¨Ï¥Îªº¥Ø¿ý¡CµM¦Ó¡A¦pªGÀ³¥Îµ{¦¡ªø®É¶¡¥¼°õ¦æ¡A¸Ó¥Ø¿ý·|³Q±Ë±ó¡C
⒟¡B¦pªG lpstrInitialDir ¬°¹s¡A¥BÀ³¥Îµ{¦¡¤§«e¥¼´¿¨Ï¥Î¹L¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°¡A¦ý¬O·í«e¥Ø¿ý¥]§t²Å¦X lpstrFilter ©Ò«ü©w¿z¿ï§Î¦¡ªºÀɮסA¨º»òªì©l¥Ø¿ý¬°·í«e¥Ø¿ý¡C
⒠¡B©Ó¤W⒟ªº±ø¥ó¡A·í«e¥Ø¿ý¨S¦³²Å¦X lpstrFilter ©Ò«ü©w¿z¿ï§Î¦¡ªºÀɮסAªì©l¥Ø¿ý¬°¨Ï¥ÎªÌªº¡u§Úªº¤å¥ó¡v¸ê®Æ§¨¡]C:\Documents and Settings\¨Ï¥ÎªÌ¦WºÙ\My Documents\¡^¡C
⒡¡B©Ó¤W⒠ªº±ø¥ó¡A¨Ï¥ÎªÌªº¡u§Úªº¤å¥ó¡v¸ê®Æ§¨¤£¦s¦b©ÎµLªk¦s¨ú®É¡A©ÎªÌ³£¤£²Å¦X¤W­z©Ò¦³±ø¥ó¡Aªì©l¥Ø¿ý¬°®à­±¸ê®Æ§¨¡]C:\Documents and Settings\¨Ï¥ÎªÌ¦WºÙ\Desktop\¡^¡C
⑷¡BWindows 7¡G
⒜¡B¦pªG lpstrInitialDir ªº­È»PÀ³¥Îµ{¦¡­º¦¸¨Ï¥Î¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°®É©Ò¶Ç¤Jªº lpstrInitialDir ­È¬Û¦P¡A«hªì©l¥Ø¿ý¬O¨Ï¥ÎªÌ³Ìªñ¿ï¾Üªº¸ô®|¡C
⒝¡B¦pªG¤£¬Ûµ¥¥B lpstrFile ¥]§t¸ô®|¡A¨º»òªì©l¥Ø¿ý¬° lpstrFile ©Ò¥]§tªº¸ô®|¡C
⒞¡B¦pªG lpstrFile ¤£¥]§t¸ô®|¡A¥B lpstrInitialDir ¤w«ü©w¸ô®|¡A¨º»òªì©l¥Ø¿ý¬° lpstrInitialDir ©Ò«ü©w¸ô®|¡C
⒟¡B¦pªG lpstrInitialDir ¬°¹s¡A¨Ã¥B·í«e¥Ø¿ý§t¦³²Å¦X lpstrFilter ©Ò«ü©w¿z¿ï§Î¦¡ªºÀɮסA¨º»òªì©l¥Ø¿ý¬°·í«e¥Ø¿ý¡C
⒠¡B¦pªG·í«e¥Ø¿ý¤£§t²Å¦X lpstrFilter ©Ò«ü©w¿z¿ï§Î¦¡ªºÀɮסA¨º»òªì©l¥Ø¿ý¬°·í«e¨Ï¥ÎªÌªº¡u§Úªº¤å¥ó¡v¸ê®Æ§¨¡]C:\Users\¨Ï¥ÎªÌ¦WºÙ\Documents\¡^¡C
⒡¡B¦pªG¤W­z±ø¥ó§¡¤£º¡¨¬¡Aªì©l¥Ø¿ý¬°¨Ï¥ÎªÌªº®à­±¸ê®Æ§¨¡]C:\Users\¨Ï¥ÎªÌ¦WºÙ\Desktop\¡^¡C
³o¨à¦³¥²­n»¡©ú⒜ªº·N«ä¡AÁ|­Ó¨Ò¤l¥i¯à·|§ó¦n¡A°²³]¥H¤U±¡¹Ò¡G
㈠¡B¦pªG¦³­ÓÀ³¥Îµ{¦¡±q¥¼°õ¦æ¹L¡A·í¥¦²Ä¤@¦¸°õ¦æ®É²£¥Í¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°®É¡A°²³] lpstrInitialDir ¬°¡uD:\ASM\¡v¥B lpstrFile ¬°¹s¡C¦]¬°¬O²Ä¤@¦¸¶}±Ò¹ï¸Ü²°¤£°µ⒜ªº¤ñ¸û¡A¦Ó¥B lpstrFile ¨S¦³¸ô®|¡A©Ò¥H¨Ì¾Ú⒞¡Aªì©l¥Ø¿ý¬°¡uD:\ASM\¡v¡A¹ï¸Ü²°¤Wªºªì©l¥Ø¿ý¬O¡uD:\ASM\¡v¡C
㈡¡B°²³]¨Ï¥ÎªÌ§ó´«¥Ø¿ý¬°¡uD:\ASM\WIN64\¡v¡A¨Ã¬D¿ï¤F¨ä¤¤ªº¡uPRIME.ASM¡vÀɮסA«ö¡u½T©w¡v«ö¶sÂ÷¶}¹ï¸Ü²°¡C¨t²Î·|°O¦í³o­Ó§ïÅܫ᪺¥Ø¿ý¡C
㈢¡B¤U¦¸¦A¶}±Ò¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°®É¡A°²³] lpstrInitialDir ¤´¬°¡uD:\ASM\¡v¡A¦]¬°»P²Ä¤@¦¸¶Ç¤Jªº lpstrInitialDir ¬Û¦P¡A©Ò¥H¨t²Î·|©¿²¤¡uD:\ASM\¡v¡A¦Ó§âªì©l¥Ø¿ý³]¬°¤W¦¸¨Ï¥ÎªÌ¿ï¾Üªº¡uD:\ASM\WIN64\¡v¡A³o´N¬O⒜ªº§@¥Î¡C³oºØµ¦²¤«Ü²Å¦X¤H­Ì¦b¾³õ¤Wªº¤u§@¡C·í¤H­Ì­×§ï¬Y­ÓÀɮסA¸ÓÀɮצb­×§ï¹Lµ{¤¤³q±`©ñ¦b¦P¤@¥Ø¿ýùØ¡A¦Ó¥B¤]»Ý­n¸g¹L¦h¦¸­×§ï¡AÅý¨Ï¥ÎªÌ¥u¶·²Ä¤@¦¸¿ï¾Ü¸Ó¥Ø¿ý¡A¥H«á¤£¥²¦A­«·s¿ï¾Ü¡A¤ñ¸û¤è«K¡C
㈣¡B°²¦p¤U¦¸¶}±Ò¹ï¸Ü²°®É¡AlpstrInitialDir Åܬ°¡uD:\ASM\WIN32\¡v¡A¨º»ò¨t²Î·|¥H¡uD:\ASM\WIN32\¡v§@¬°ªì©l¥Ø¿ý¡A¦Ó¤£ºÞ¤W¦¸¿ï¾Üªº¬O­þ­Ó¥Ø¿ý¡C
⑬¡BlpstrTitle¡G¼ÐÃDÄæ¦r¦êªº¦ì§}¡C¦pªG lpstrTitle ¬°¹s¡Aªí¥Ü¨Ï¥Î¹w³]ªº¼ÐÃDÄæ¡C¹w³]ªº¼ÐÃDÄæ¦r¦ê·|ÀH Windows ª©¥»¤£¦P¦Ó¤£¦P¡C¨Ò¦p¡A©I¥s GetOpenFileName ®É¡AWindows 7 ¤Î¨ä¥H«eªº¬O¡u¶}±ÒÂÂÀÉ¡v¡A¦Ó Windows 10 ¬O¡u¶}±Ò¡v¡F¦pªG©I¥s GetSaveFileName¡AWindows 7¡BWindows 10 ³£¬O¡u¥t¦s·sÀÉ¡v¡C
⑭¡BFlags¡AºX¼Ð¡A¥Î¨Óªì©l¤Æ¹ï¸Ü²°©Î¬O§ïÅܹï¸Ü©M¥~Æ[µ¥¡A±`¥Î¨ìªº¼Æ­È¦p¤Uªí¡A¤]¥i¥H¥Î¡uOR¡v¹Bºâ¤l³s±µ¼Æ­ÓºX¼Ð¡G
Flags»¡©ú
OFN_READONLY
1
¨Ï¡u°ßŪ¡v½Æ¿ï®Ø¦b¹ï¸Ü²°¤@¶}©l«Ø¥ß®É¡A¬°¿ï¤¤ª¬ºA¡C
OFN_OVERWRITEPROMPT
2
OFN_OVERWRITEPROMPT ¥u¦³¦b©I¥s GetSaveFileName ¦³®Ä¡C·í¨Ï¥ÎªÌ¿ï¾Ü¤w¦s¦bªºÀɮ׮ɡA¨t²Î·|ĵ§i¸ÓÀɮפw¦s¦b¡A¬O§_­n¨ú¥N¡H¦pªG¦^µª¡u¬O¡v¡A¥t¦s·sÀɹï¸Ü²°³Q¾P·´¦^¨ì­ìÀ³¥Îµ{¦¡¡F¦pªG¦^µª¡u§_¡v¡Aªð¦^¥t¦s·sÀɹï¸Ü²°Åý¨Ï¥ÎªÌÄ~Äò¿ï¾Ü¡C
OFN_HIDEREADONLY
4
¤£Åã¥Ü¡u°ßŪ¡v½Æ¿ï®Ø¡C
OFN_NOCHANGEDIR
8
¦pªG¨Ï¥ÎªÌ¦b©I¥s GetSaveFileName ¼u¥Xªº³q¥Î¹ï¸Ü²°¤¤¡A·j´MÀÉ®×®ÉÅܧó¤u§@¥Ø¿ý¡Aªð¦^®É·|±N¥Ø¿ýÁ٭쬰©I¥s«eªº¤u§@¥Ø¿ý¡C¦ý¦¹ºX¼Ð¹ï GetOpenFileName µL®Ä¡C
OFN_SHOWHELP
10h
Åã¥Ü»¡©ú«ö¶s¡C·í¨Ï¥ÎªÌ«ö¤U¸Ó«ö¶s«á¡AÄdºIµ{¦¡¦¬¨ì WM_NOTIFY °T®§¡A¦¹°T®§¤¤·|§t¦³ CDN_HELP ³qª¾½X¡AÄdºI¨ç¦¡»Ý³B²z¦¹³qª¾½X¡]¨£ WM_NOTIFY¡^¡C¦]¦¹¥²¶·¦b Flags ³]©w OFN_ENABLEHOOK¡A¨Ã¥B¦b lpfnHook Äæ¦ì³]©wÄdºI¨ç¦¡¦ì§}¡C
OFN_ENABLEHOOK
20h
¦¹ºX¼Ð±Ò¥Î lpfnHook Äæ¦ì¡C
OFN_ENABLETEMPLATE
40h
¦¹ºX¼Ð±Ò¥Î lpTemplateName Äæ¦ì¡C
OFN_ENABLETEMPLATEHANDLE
80h
OFN_NOVALIDATE
100h
¹w³]±¡§Î¤U¡A¨Ï¥ÎªÌ¦b½s¿è®Ø¤º¿é¤JªºÀɦW§t¤£¦Xªk¦r¤¸¡A«ö¤U¡u¶}±Ò¡v«ö¶s«á¨t²Î·|´£¥Xĵ§i¡A¨Ãªð¦^³q¥Î¹ï¸Ü²°Åý¨Ï¥ÎªÌÄ~Äò¿ï¾Ü¡C¦ý³]©w OFN_NOVALIDATE «á¡A¨t²Î¤£ÅçÃÒÀɮצWºÙ¡A¤¹³\¨Ï¥ÎªÌ©ó½s¿è®Ø¿é¤JµL®ÄÀɦW¡C
OFN_ALLOWMULTISELECT
200h
¤¹³\¨Ï¥ÎªÌ¬D¿ï¦h­ÓÀɮסC­Y Flags §t OFN_ALLOWMULTISELECT »P OPN_EXPLORER¡A¨º»ò¨Ï¥Î¡uÁ`ºÞ­·®æ¡v¡F­Y¥u§t OFN_ALLOWMULTISELECT ¦ý¤£§t OPN_EXPLORER¡A¨º»ò·|¨Ï¥Î¡u­·®æ¡v¡C
OFN_EXTENSIONDIFFERENT
400h
·í¨Ï¥ÎªÌ¿é¤Jªº°ÆÀɦW»P lpstrDefExt ©Ò«ü©wªº°ÆÀɦW¤£¦P¡A¨º»ò·í GetOpenFileName ©Î GetSaveFileName ªð¦^®É¡A¨t²Î·|¦b Flags ³]©w OFN_EXTENSIONDIFFERENT ºX¼Ð¡AÀ³¥Îµ{¦¡¥iÀˬd¬O§_§t¦¹ºX¼Ð¦Ó°µ«áÄò³B²z¡C¦pªG lpstrDefExt ¬°¹s¡A¨º»ò´N¤£¨Ï¥Î¦¹ºX¼Ð¡C
OFN_FILEMUSTEXIST
1000h
³]©w OFN_FILEMUSTEXIST «á¡A¨Ï¥ÎªÌ¦pªG¦b½s¿è®Ø¿é¤J¤£¦s¦bªºÀɮרëö¤U¶}±Ò«ö¶s¡A¨t²Î·|¼u¥X¤@¹ï¸Ü²°Äµ§i§ä¤£¨ì¸ÓÀɮסA¨Ãªð¦^³q¥Î¹ï¸Ü²°¤ºÄ~ÄòÅý¨Ï¥ÎªÌ¿ï¾Ü¡C
OFN_CREATEPROMPT
2000h
·í¨Ï¥ÎªÌ¿é¤J¤£¦s¦bªºÀɮ׮ɡA¦¹ºX¼Ð·|¾É­P¹ï¸Ü²°´£¥Ü¨Ï¥ÎªÌ¬O§_«Ø¥ßÀɮסC¦pªG¨Ï¥ÎªÌ¿ï¾Ü«Ø¥ßÀɮסA¹ï¸Ü¤è²°·|Ãö³¬¡AGetOpenFileName ©Î GetSaveFileName ·|¶Ç¦^¿é¤JªºÀɦW¨ÑÀ³¥Îµ{¦¡¶i¦æ«áÄò³B²z¡F§_«h¡Aªð¦^¹ï¸Ü²°¤è¶ô¡C¦pªG¦¹ºX¼Ð¦P®ÉÁÙ·f°t OFN_ALLOWMULTISELECT¡A¨º»ò¨t²Î¥u¶Ç¦^²Ä¤@­ÓÀɮצWºÙ¡C
OFN_SHAREAWARE
4000h
«ü©w¦pªG OpenFile ¨ç¦¡ªº©I¥s¦]¬°ºô¸ô¦@¥Î¹H³W¦Ó¥¢±Ñ¡A«h·|©¿²¤¿ù»~¡A¦Ó¥B¹ï¸Ü²°·|¶Ç¦^¿ï¨úªºÀɮצW¡C¦pªG¥¼³]©w¦¹ºX¼Ð¡A¹ï¸Ü²°·|¦b¨Ï¥ÎªÌ«ü©wªºÀɮצWµo¥Íºô¸ô¦@¥Î¹H³W®É³qª¾±zªºÄdºIµ{¦¡¡C¦pªG±z³]©w OFN_EXPLORER ºX¼Ð¡A¹ï¸Ü²°·|±N CDN_SHAREVIOLATION °T®§¶Ç°e¦ÜÄdºIµ{¦¡¡C¦pªG±z¥¼³]©w OFN_EXPLORER¡A¹ï¸Ü¤è¶ô·|±N SHAREVISTRING ¤wµù¥Uªº°T®§¶Ç°e¦ÜÄdºI¨ç¦¡¡C
OFN_NOREADONLYRETURN
8000h
¶Ç¦^ªºÀÉ®×¥¼¿ï¨ú¡u°ßŪ¡v½Æ¿ï®Ø¡A¦Ó¥B¤£¦b¨ü¼g¤J«OÅ@ªº¥Ø¿ý¤¤¡C
OFN_NOTESTFILECREATE
10000h
¦pªGÀ³¥Îµ{¦¡±NÀÉ®×Àx¦s¦b create-nonmodify ¦@¥Îºô¸ô¤W¡A«hÀ³¸Ó«ü©w¦¹ºX¼Ð¡F¦¹®É¡Aµ{¦¡®w¤£·|Àˬd¼g¤J«OÅ@¡B§¹¾ãºÏ¤ù¡B¶}±ÒªººÏ¤ùºÏºÐ¾÷ªù©Îºô¸ô«OÅ@¡C
OFN_NONETWORKBUTTON
20000h
¤£Åã¥Ü¡uºô¸ô¡v«ö¶s¡C¦ýÁ`ºÞ­·®æ¥ª°¼¡u¦ì¸m¦C¡v¡]­ì¤å¬O¡uplaces bar¡v¡A¤]½Ķ¦¨¡u±`¥Î¦ì¸m¦C¡v¡^¤¤ªººô¸ô¡A¤´·|Åã¥Ü¡C
OFN_NOLONGNAMES
40000h
¹ï©ó­·®æªº¹ï¸Ü²°¡A¦¹ºX¼Ð·|¨Ï¥ÎµuÀɦW®æ¦¡¡]8.3 ®æ¦¡¡^¡CÁ`ºÞ­·®æ¹ï¸Ü²°·|©¿²¤¦¹ºX¼Ð¡A¤@«ßÅã¥ÜªøÀɦW¡C
OFN_EXPLORER
80000h
¨Ï¹ï¸Ü²°±Ä¡uÁ`ºÞ­·®æ¡v¡]Explorer-style¡^Åã¥Ü¨äµe­±¦p¹Ï¤G¡C³o¬O¹w©wªººX¼Ð¡A¤]´N¬O¤£ºÞ¦³¨S¦³¦b Flags ¤¤«ü©w OPN_EXPLORER ³£·|±Ä¥Î³oºØ­·®æ¡C
¥t¤@ºØºÙ¬°Â­·®æ¡]old-style¡^¡A¦p¹Ï¥|¡CFlags ¤£§t OPN_EXPLORER¡A¦ý§t¦³ OFN_ALLOWMULTISELECT¡A´N·|¨Ï¥Î­·®æ¡C¦³Ãö­·®æ¡AÁÙ¦³§ó¦h¸ê°T½Ð°Ñ¾\µù¤@¡C
OFN_NODEREFERENCELINKS
100000h
«ü¥Ü¹ï¸Ü²°¶Ç¦^©Ò¿ï±¶®|¡].LNK¡^ªº¸ô®|©MÀɮצWÀɮסF¦pªG¥¼«ü©w¦¹­È¡A¶Ç¦^ªº¬O±¶®|¬O¯u¹êÀɮתº¸ô®|©MÀɮצW¡C
OFN_LONGNAMES
200000h
¦¹ºX¼ÐÅý­·®æ¹ï¸Ü²°¨Ï¥ÎªøÀɦW¡F­Y¥¼³]¦¹ºX¼Ð¡A©Î³]¸m OFN_ALLOWMULTISELECT ºX¼Ð¡A­·®æ¹ï¸Ü²°·|¨Ï§t¦³ªÅ®æªºÀɮצW±Ä¥ÎµuÀɮצW¡]8.3 ®æ¦¡¡^¡CÁ`ºÞ­·®æ¹ï¸Ü²°·|©¿²¤¦¹ºX¼Ð¡A¨Ã¤@«ßÅã¥ÜªøÀɦW¡C
OFN_ENABLEINCLUDENOTIFY
400000h
·í¨Ï¥ÎªÌ¶}±Ò¸ê®Æ§¨®É¡A·|¾É­P¹ï¸Ü²°±N CDN_INCLUDEITEM ³qª¾½X¶Ç°e¦ÜÄdºIµ{¦¡¡C¹ï¸Ü²°·|°w¹ï·s¶}±Òªº¸ê®Æ§¨¤¤ªº¨C­Ó¶µ¥Ø¶Ç°e³qª¾½X¡AÂǥѳo³qª¾½X¡AÀ³¥Îµ{¦¡¥i¥H±±¨î¹ï¸Ü²°¦b²M³æ²°±±¨î¶µ¤¤Åã¥Ü­þ¨Ç¶µ¥Ø¡C
OFN_ENABLESIZING
800000h
³]©w OFN_ENABLESIZING «á¯à°÷¨Ï¥Î·Æ¹«©ÎÁä½L¨Ó½Õ¾ã¹ï¸Ü²°¤j¤p¡C¦ý¬O¨ã¦³¡uÁ`ºÞ­·®æ¡vªº¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°¤¹³\½Õ¾ã¹ï¸Ü²°¤j¤p¡A¦Ó¤£½×¬O§_³]©w¤F¦¹ºX¼Ð¡C¥u¦³¦b¦Û¦æ¼¶¼gªº±¾¹_¨ç¦¡©Î¦Û­q½d¥»®É¡A¤~»Ý­n¦¹ºX¼Ð¡C­·®æ¹ï¸Ü²°¤£¤¹³\½Õ¾ã¤j¤p¡A¤£½×¬O§_³]©w¤F¦¹ºX¼Ð¡C
OFN_FORCESHOWHIDDEN
10000000
±j¨îÅã¥Ü¨t²ÎÀɮשMÁôÂÃÀɮסA±q¦ÓÂл\¨Ï¥ÎªÌ³]©wªº¡uÅã¥Ü©Î¤£Åã¥ÜÁôÂäå¥ó¡v¿ï¶µ¡CµM¦Ó¡A¤£·|Åã¥Ü¦P®É¬°¨t²Î©MÁôÂÃÄݩʪºÀɮסC
⑮¡BnFileOffset¡G¨Ï¥ÎªÌ¿ï©w¦nÀɮפ§«á¡A¨t²Î·|§âÀɦW¦ì©ó lpstrFile ªº²Ä´X­Ó¦r¤¸¶ñ¤J¦¹Äæ¦ì¡A¥Ñ¹s¶}©l­p¼Æ¡C¨Ò¦p lpstrFile ©Ò«ü¦ì§}ªº§¹¾ãÀɦW¬O¡u"E:\TST\MYCODE.ASM",0¡v¡A¨º»ò nFileOffset ¬° 7¡C¦pªG¨Ï¥ÎªÌ¿ï¾Ü¤F¦h­ÓÀɮסA¨º»ò nFileOffset «üªº¬O²Ä¤@­ÓÀɮתºÀɦW¦ì©ó²Ä´X­Ó¦r¤¸¡C
¡BnFileExtension¡G¨Ï¥ÎªÌ¿ï©w¦nÀɮפ§«á¡A¨t²Î·|§â°ÆÀɦW¦ì©ó lpstrFile ªº²Ä´X­Ó¦r¤¸¶ñ¤J¦¹Äæ¦ì¡A¥Ñ¹s¶}©l­p¼Æ¡C¨Ò¦p lpstrFile ©Ò«ü¦ì§}ªº§¹¾ãÀɦW¬O¡u"E:\TST\MYCODE.ASM",0¡v¡A¨º»ò nFileExtension ¬° 14¡C¦pªG¨Ï¥ÎªÌ¿ï¾Ü¤F¦h­ÓÀɮסA¨º»ò¨t²Î¤£¨Ï¥Î nFileExtension¡C
¡BlpstrDefExt¡G¹w³]°ÆÀɦWªº¦ì§}¡A¦pªG°ÆÀɦW¶W¹L¤T­Ó¦r¤¸¡A¨º»ò¶È«e­±¤T­Ó¦r¤¸¦³®Ä¡C°ÆÀɦW«e¤£¶·¥[¤W¡u.¡v¡A¨t²Î·|¦Û¦æ²K¥[¡F¦pªG°ÆÀɦW«e¦³¡u.¡v¡A¨º»ò¨t²Î·|§â¡u.¡v¦©°£¡A¦Ó¨ú¦©°£¡u.¡v¤§«áªº«e¤T­Ó¦r¤¸¬°°ÆÀɦW¡C
⑴¡B¦pªG lpstrDefExt ¤w³]¦n¹w³]°ÆÀɦW¦ì§}¡A¨Ï¥ÎªÌ©ó³q¥Î¹ï¸Ü²°ªº½s¿è®Ø¿é¤JÀɮצWºÙ¡A¦³©³¤U¨âºØ±¡§Î¡G
⒜¡B¨Ï¥ÎªÌ¨S¿é¤J°ÆÀɦW¡A¨º»ò¨t²Î·|§âÀɮצWºÙµø¬°¥DÀɦW¡A¨Ã¦Û°Ê¦b«á­±¥[¤W lpstrDefExt ¦ì§}¤Wªº°ÆÀɦW¡C
⒝¡B¨Ï¥ÎªÌ¦³¿é¤J°ÆÀɦW¦ý»P lpstrDefExt ©Ò«ü©wªº¤£¦P¡A¨º»ò lpstrFile ©Ò«üªº¦ì§}¦s¤Jªº¬O¨Ï¥ÎªÌ¿é¤JªºÀɦW¡A¥B·|©ó Flags Äæ¦ì³]©w OFN_EXTENSIONDIFFERENT¡C
⑵¡B¦pªG lpstrDefExt ³]¬°¹s¡A¨Ï¥ÎªÌ©ó³q¥Î¹ï¸Ü²°ªº½s¿è®Ø¿é¤J¨S¦³°ÆÀɦWªºÀɮצWºÙ¡A¨º»ò¦b lpstrFile ©Ò«üªºÀɦW´N¥u¦³¥DÀɦW¡A¨t²Î¤£·|¦Û°Ê©ó«á¥[¤W°ÆÀɦW¡C
¡BlCustData¡GÀ³¥Îµ{¦¡¦Û¦æ©w¸qªº¸ê®Æ¡A¥iÂÇ¥Ñ WM_INITDIALOG °T®§¶Çµ¹ÄdºIµ{¦¡¡AÄdºI¨ç¦¡¦¬¨ì WM_INITDIALOG °T®§¡A¨ä¤¤ lParam ·|¦³ OPENFILENAME µ²ºcÅ骺¦ì§}¡A±q³o¨à¥i¥H±o¨ì lCustData ¤¤¦Û¦æ©w¸qªº¸ê®Æ¡C
¡BlpfnHook¡GÄdºI¨ç¦¡¦ì§}¡A¥u¦³¦b Flags Äæ¦ì¥]§t OFN_ENABLEHOOK ºX¼Ð¡AlpfnHook ¤~¦³®Ä¡CÄdºI¨ç¦¡¥i¨Ï¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°³B²z±±¨î¶µªº¿é¤J¡A©Î²K¥[ÃB¥~ªº¥\¯à¡C¨£ÄdºI¨ç¦¡¤@¸`¡C
¡BlpTemplateName¡G¹ï¸Ü²°­±ªO¦WºÙªº¦ì§}¡A©Î¹ï¸Ü²°­±ªOÃѧO½X¡A¤£½×¬O­þ¤@ºØ³£¬O¦b hInstance Äæ¦ì©Ò«ü©w¼Ò²Õ¥N½X¤¤ªº¸ê·½¤º¡C¥u¦³¦b Flags Äæ¦ì¥]§t OFN_ENABLETEMPLATE ºX¼Ð¡AlpTemplateName ¤~¦³®Ä¡C¦pªG Flags ¦P®É³]©w OFN_EXPLORER¡A¨t²Î·|¨Ï¥Î¦¹Äæ¦ì©Ò«ü©wªº¹ï¸Ü²°­±ªO¨Ó«Ø¥ß¹ï¸Ü²°¡A©Ò«Ø¥ßªº¹ï¸Ü²°¬O¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɹï¸Ü²°ªº¤l¹ï¸Ü²°¡A¸Ô²Ó±¡§Î¨£¤U¤@³¹¡C¦pªG¥¼³]©w OFN_EXPLORER¡A¨t²Î¤]¨Ï¥Î¦¹Äæ¦ì©Ò«ü©wªº¹ï¸Ü²°­±ªO¨Ó«Ø¥ß¹ï¸Ü²°¡A¦ý«o¬O¨ú¥N­·®æªº¹ï¸Ü²°¡C
㉑¡B_WIN32_WINNT GE 500h¡G_WIN32_WINNT GE 500h ¨Ã«D OPENFILENAME ªºÄæ¦ì¡A¦Ó¬O±ø¥ó²ÕĶ§PÂ_¦¡¡A¥¦ªº·N¸q¬O¦pªG _WIN32_WINNT¡]_WIN32_WINNT ¬O Windows ª©¥»¡^¤j©ó©Îµ¥©ó 500h¡A¤~²ÕĶ IF ©M ENDIF ¤§¶¡ªºµ{¦¡½X¡CWindows ª©¥»«Ü½ÆÂø¡A¥i°Ñ¾\µù¤G¡CWindows ª©¥»¬° NT 5.00 ªº¬O Windows 2000¡A¤]´N¬O¦b Windows 2000 ¤Î¨ä§ó·sªºª©¥»¤~¤ä´©©³¤U㉒¡ã㉔¤T­ÓÄæ¦ì¡C
㉒¡BpvReserved¡G«O¯d¡AÀ³³]¬° 0¡C
㉓¡BdwReserved¡G«O¯d¡AÀ³³]¬° 0¡C
㉔¡BFlagsEx¡G¥Î©óªì©l¤Æ¹ï¸Ü²°ªºÂX¥RºX¼Ð¡A¥i¥H¬O¹s©Î OFN_EX_NOPLACESBAR¡]OFN_EX_NOPLACESBAR µ¥©ó 1¡^¡C¦pªG§â FlagsEx ³]¬° OFN_EX_NOPLACESBAR¡A¨º»ò¤£Åã¥Ü¹ï¸Ü²°¥ªÃ䪺¡u¦ì¸m¦C¡v¡A¦ý¥u¦³¦b Windows XP ¤Î§ó¦­ªº§@·~¨t²Î¤W¶}µoªºÀ³¥Îµ{¦¡¦³®Ä¡C

WM_NOTIFY °T®§

²Ä¤G¤Q³¹´£¹Lªº¼Ð·Ç±±¨î¶µ¯àµo¥X WM_COMMAND °T®§¡A¦ý¦³¨Ç±±¨î¶µ¤£µo¥X WM_COMMAND °T®§¡A¦Ó¬Oµo¥X WM_NOTIFY °T®§¡A¨Ò¦p³q¥Î±±¨î¶µ¡]common controls¡^¥H¤Î¦b¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɳq¥Î¹ï¸Ü²°¤¤ªº¡u»¡©ú¡v«ö¶s´N¬O¦p¦¹¡C

WM_NOTIFY °T®§ªº wParam ¬Oµo¥X WM_NOTIFY °T®§ªº±±¨î¶µÃѧO½X¡]identifier¡^¡AÃѧO½X¨Ã¤£¤@©w¬O°ß¤@ªº¡A©Ò¥HÀ³¥Îµ{¦¡À³¸Ó¨Ï¥Î NMHDR µ²ºcÅ餤ªº hwndFrom ©Î idFrom Äæ¦ì¨ÓÃѧO±±¨î¶µ¡C

WM_NOTIFY °T®§ªº lParam ¬O¤@­Óµ²ºcÅ骺¦ì§}¡A¤£¦P±±¨î¶µ¦b lParam ©Ò«ü¦ì§}¤Wªºµ²ºcÅ餣¦P¡A¨Ò¦p²M³æÀ˵ø±±¨î¶µ¡]list view¡^ªºµ²ºcÅé¬O NMLISTVIEW¡A¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɳq¥Î¹ï¸Ü²°¤¤ªº¡u»¡©ú¡v«ö¶sªºµ²ºcÅé¬O OFNOTIFY¡COFNOTIFY ªº¦U­ÓÄæ¦ì¦p¤U¡G¡]ª`·N¡IOFNOTIFY µ²ºcÅ馳¹ï»ô­È QWORD¡AWinInc ¦b COMMDLG.INC ¤¤¿òº|¹ï»ô­È¥²¶·§ó¥¿¤~¯à¥¿½T°õ¦æ¡^

OFNOTIFY    STRUCT  QWORD
  hdr       NMHDR   <>  ;NMHDR µ²ºcÅé
  lpOFN     DQWORD  ?   ;OPENFILENAME µ²ºcÅé¦ì§}
  pszFile   LPSTR   ?   ;ÀɮצWºÙ¦ì§}
OFNOTIFY    ENDS

©³¤U»¡©ú OFNOTIFY ªº¦UÄæ¦ì¡G

①¡Bhdr¡Ghdr ¬O¤@­ÓºÙ¬° NMHDR ªºµ²ºcÅé¡C¤£½× WM_NOTIFY °T®§¬O¥Ñ­þ¤@ºØ±±¨î¶µµo¥X¡A¨ä lParam ©Ò«üªºµ²ºcÅéÁö¤£¦P¡A¦ý¬O¤£½×¬O­þ¤@ºØµ²ºcÅé¡A¨ä²Ä¤@­ÓÄæ¦ì¥²©w¬O¤@­ÓºÙ¬° NMHDR ªºµ²ºcÅé¡CNMHDR µ²ºcÅ骺¦UÄæ¦ì¦p¤U¡]NMHDR ¬O notification message header ªº·N«ä¡^¡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
¦b NMHDR Äæ¦ì¤¤ªº code¡AºÙ¬°³qª¾½X¡A¨t²Î·|§â¨Ï¥ÎªÌªº¾Þ§@¤èªk³qª¾µ¹¹ï¸Ü²°¨ç¦¡¡A¤£¦Pªº±±¨î¶µ¦³¤£¦Pªº¾Þ§@¤èªk¡A©Ò¥H¦³¤£¦Pªº³qª¾½X¡C¨Ò¦p·í¨Ï¥ÎªÌ«ö¤U¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɳq¥Î¹ï¸Ü²°¤¤ªº¡u»¡©ú¡v«ö¶s®É¡Acode Äæ¦ì´N¬O CDN_HELP¡C
ÁöµM¤£¦Pªº±±¨î¶µ·|µo¥X¤£¦Pªº³qª¾½X¡A¦ý¬O©³¤Uªº¤KºØ³qª¾½X¬O¨C¤@ºØ³q¥Î±±¨î¶µ³£·|µo¥Xªº¡G
³qª¾½X»¡©ú
NM_CLICK¨Ï¥ÎªÌ¦b³q¥Î±±¨î¶µ«ö¤UÃP¶}·Æ¹«¥ªÁä
NM_DBLCLK¨Ï¥ÎªÌ¦b³q¥Î±±¨î¶µ³sÄò¨â¦¸«ö¤UÃP¶}·Æ¹«¥ªÁä
NM_RCLICK¨Ï¥ÎªÌ¦b³q¥Î±±¨î¶µ«ö¤UÃP¶}·Æ¹«¥kÁä
NM_RDBLCLK¨Ï¥ÎªÌ¦b³q¥Î±±¨î¶µ³sÄò¨â¦¸«ö¤UÃP¶}·Æ¹«¥kÁä
NM_RETURN¨Ï¥ÎªÌ¦b³q¥Î±±¨î¶µ¾Ö¦³¿é¤JµJÂI®É¡A«ö¤UÁä½L¤Wªº¡uEnter¡vÁä
NM_SETFOCUS³q¥Î±±¨î¶µÀò±o¿é¤JµJÂI
NM_KILLFOCUS³q¥Î±±¨î¶µ¥¢¥h¿é¤JµJÂI
NM_OUTOFMEMORY¨S¦³¨¬°÷ªº°O¾ÐÅé¾Þ§@³q¥Î±±¨î¶µ
·í¨Ï¥ÎªÌ¾Þ§@¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɮɡA¥¦­Ì¤]·|¥HÄâ±aµÛ¤£¦Pªº³qª¾½Xµo°eµ¹ÄdºI¨ç¦¡¡A³o¨Ç³qª¾½X¨£¤U¤@³¹¡C
②¡BlpOFN¡GlpOFN ¬O OPENFILENAME µ²ºcÅé¦ì§}¡A¦¹µ²ºcÅé´N¬O©I¥s GetOpenFileName ©Î GetSaveFileName ®Éªº°Ñ¼Æ¡C
③¡BpszFile¡GÀɦW¦ì§}¡A¦¹ÀɦW¬Oµo¥Íºô¸ô¦@¥Î¹H³WªºÀɦW¡C¦¹Äæ¦ì¥u¦³¾A¥Î©ó CDN_SHAREVIOLATION ³qª¾½X¡C

¦]¬° OFNOTIFY µ²ºcÅé¬O¥Ñ¨t²Î¸g¥Ñ WM_NOTIFY °T®§ªº lParam °Ñ¼Æ«ü©wªº¡A¨Ã«D¥ÑÀ³¥Îµ{¦¡¦Û¦æ©w¸qªº¡A¦s¨ú OFNOTIFY µ²ºcÅé´N·|¤ñ¸û³Â·Ð¡C

³q±`·|¥Î ASSUME °²«ü¥O«Å§i¬Y­Ó 64 ¦ì¤¸ªº¼È¦s¾¹¹ïÀ³¦¹µ²ºcÅé°_©l¦ì§}¡A¦A±N¦¹¼È¦s¾¹¤§­È³]¬° lParam¡A³o¼Ë¸Ó¼È¦s¾¹´N¬Oµ²ºcÅ骺°_©l¦ì§}¡AµM«á´N¯à¥Ñ¤@¯ë¦s¨úµ²ºcÅ骺¤è¦¡¦s¨ú¦UÄæ¦ì¡C¦pªG¤£¶·¦A¦s¨ú¸Óµ²ºcÅé¡A¶·¨ú®ø¦¹¼È¦s¾¹¹ïÀ³ªºµ²ºcÅ骺«Å§i¡C¨Ò¦p©³¤Uªº¨Ò¤l¬O¥H R11 «ü¦V OFNOTIFY µ²ºcÅ骺°_©l¦ì§}¡A°²¦p­n¦s¨ú NMHDR ¤¤ªº code ©Î¨ä¥LÄæ¦ì¤]¤£§xÃø¡A¨£¤U­±²Ä¤T¦C¡A¹Lµ{¦p¤U¡G

        ASSUME  r11:PTR OFNOTIFY
        mov     r11,lParam
        mov     eax,[r11].hdr.code
         ⁝
        ASSUME  r11:NOTHING

ÄdºI¨ç¦¡¡]Hook Procedure¡^

ÄdºI¨ç¦¡­ì¤å¬° hook procedure¡A¤]½Ķ¦¨±¾¹_¨ç¦¡¡A¬O¤@ºØÀ³¥Îµ{¦¡©w¸qªº¦^©I¨ç¦¡¡A¥¦¯àºÊµø©Î³B²z¨t²Îµo°e¨ì¹ï¸Ü²°ªº°T®§©M¨Æ¥ó¡A¤]¥Î©ó¦Û­q¹ï¸Ü²°ªº¦æ¬°¡C§ó¸Ô²Óªº»¡¡AÄdºIµ{¦¡»P OPENFILENAME µ²ºcÅ餤¡AlpTemplateName Äæ¦ì©Ò«ü©wªº¤l¹ï¸Ü²°­±ªO·f°t«á¡A¥i¥H¦b¡u¶}±ÒÂÂÀÉ¡v©Î¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°²K¥[·sªº±±¨î¶µ¡A¥H·s¼WÃB¥~ªº¥\¯à¡CÄdºI¨ç¦¡ªº­ì«¬¦p¤U¡A¸òµøµ¡¨ç¦¡©Î¹ï¸Ü²°¨ç¦¡¤@¼Ë¡G

¨ç¦¡¦WºÙ PROC   hDlg:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
.if uMsg==°T®§¥Ò
   ⁝
.elseif uMsg==°T®§¤A
   ⁝
.else
        xor     rax,rax ;¥¼¸gÄdºI¨ç¦¡³B²z¹Lªº°T®§ªð¦^¹s
        ret
.endif
        mov     rax,1   ;¤w¥ÑÄdºI¨ç¦¡³B²z¹Lªº°T®§ªð¦^¤@
        ret
¨ç¦¡¦WºÙ ENDP

­n«Ø¥ßÄdºI¨ç¦¡¡A¥²¶·¦b OPENFILENAME µ²ºcÅ骺 Flags Äæ¦ì§t¦³ OFN_ENABLEHOOK¡A¨Ã¥B¦b lpfnHook Äæ¦ì©Ò«ü©wªºÄdºI¨ç¦¡¦ì§}¡A¯Ê¤@¤£¥i¡C

¦pªGÀ³¥Îµ{¦¡«Ø¥ß¤FÁ`ºÞ­·®æªº¶}±ÒÂÂÀÉ©Î¥t¦s·sÀɳq¥Î¹ï¸Ü²°¡A¨Ã¥B¤]´£¨Ñ¤FÄdºIµ{¦¡¡A¨º»ò¨t²Î·|¨Ì¾Ú OPENFILENAME ¤¤ lpTemplateName Äæ¦ì©Ò«ü©wªº¹ï¸Ü²°­±ªO¡A«Ø¥ß³q¥Î¹ï¸Ü²°ªº¤l¹ï¸Ü²°¡F¦Ó lpfnHook Äæ¦ì©Ò«ü©wªºÄdºI¨ç¦¡¡A´N§@¬°³o­Ó¤l¹ï¸Ü²°ªº¹ï¸Ü²°¨ç¦¡¡C°²¦pÀ³¥Îµ{¦¡¥u´£¨Ñ¤FÄdºIµ{¦¡¡A¦ý¨S¦³«ü©w¹ï¸Ü²°­±ªO¡A¨º»ò¨t²Î·|¦Û¦æ«Ø¥ß¤@­Ó¹w³]ªº¤l¹ï¸Ü²°¡A¦Ó lpfnHook Äæ¦ì©Ò«ü©wªºÄdºI¨ç¦¡¡A´N§@¬°³o­Ó¹w³]¤l¹ï¸Ü²°ªº¹ï¸Ü²°¨ç¦¡¡C

ÄdºI¨ç¦¡ªº¦æ¬°»P¹ï¸Ü²°¨ç¦¡¤@¼Ò¤@¼Ë¡C¹ï©óÀ³¥Îµ{¦¡·P¿³½ìªº°T®§¥[¥H³B²z¡A³B²z§¹²¦§â¦^¶Ç­È³]¬°¤@ªð¦^¨t²Î¡A§iª¾¨t²Î¤w³B²z¹L¸Ó°T®§¡F¹ï¤£·P¿³½ìªº°T®§¡A§â¦^¶Ç­È³]¬°¹sªð¦^¨t²Î¡A§iª¾¨t²Î¨Ã¥¼³B²z¸Ó°T®§¡A¨t²Î·|­t³d³B²z¡C


¨Ò¤l¡GVIEWBMP4

²Ä¤Q¤­³¹¤¶²Ð¤F VIEWBMP2¡BVIEWBMP3¡A¥¦­Ì³£¬O¥Ñ©R¥O´£¥Ü¦r¤¸¿é¤J¦ì¤¸¹ÏÀɮצWºÙ¡AµM«á¦A§â¦ì¤¸¹ÏÅã¥Ü¦b¤u§@°Ï¤W¡A³o¨Ã¤£²Å¦X²{¥N¤H¨Ï¥Îªº²ßºD¡C³oùؤ¶²Ðªº VIEWBMP4¡A±N§ïÅܳo­Ó¬yµ{¡C·í VIEWBMP4 °õ¦æ«á¡A¨Ï¥ÎªÌ¥i¥H¥Ñ¥D¥\¯àªí¿ï¾Ü¡uÀɮסv¡÷¡u¶}±Ò¡v¡]¨£¤U¹Ï¤­¡^¡A³o®É·|¼u¥X¡u¶}±ÒÂÂÀÉ¡v³q¥Î¹ï¸Ü²°¡]¨£¤U¹Ï¤»¡^¡C¨Ï¥ÎªÌ¥i©ó¹ï¸Ü²°¤º¬D¿ï·QÆ[¬Ýªº¦ì¤¸¹Ï¡A¤]¥i¤Á´«¨ì§Oªº¥Ø¿ý¿ï¾Ü¨ä¥L¥Ø¿ýªº¦ì¤¸¹Ï¡A
«ö¤U¡u¶}±ÒÂÂÀÉ¡v«ö¶s«á¡A´N¯àÆ[¬Ý¦ì¤¸¹Ï¤F¡C

ª`·N¨ì¤W­±¹Ï¤»¤¤ªº¥k¤U¨¤¦³­Ó¡u»¡©ú¡v«ö¶s¡A³o¬O¦]¬°¦b©I¥s GetOpenFileName ®É¡A¨ä°Ñ¼Æ OPENFILENAME ªº Flags Äæ¦ì§t¦³ OFN_SHOWHELP ºX¼Ð¡C·í¨Ï¥ÎªÌ«ö¤U³o­Ó«ö¶s®É¡A·|²£¥Í¤@­Óµøµ¡¡A»¡©ú¦¹µ{¦¡ªº¥\¥Î¡C¥¿¦]¦p¦¹¡A©Ò¥H¥²¶·¦³­ÓÄdºI¨ç¦¡³B²z«ö¤U¡u»¡©ú¡v«ö¶sªº°T®§¡A³o¤]³y¦¨ Flags Äæ¦ì»Ý­n¦³ OFN_ENABLEHOOK¡A¦P®É lpfnHook Äæ¦ì¥²¶·¬OÄdºI¨ç¦¡¦ì§}¡C

­ì©lµ{¦¡

©³¤U¬O VIEWBMP4.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.ViewBmp4"
    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 VIEWBMP4.RC¡G

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "RESOURCE.H"
#define VBMENU   2000
#define IDM_OPEN 2001
#define IDM_QUIT 2002
#define IDM_HELP 2003
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 "VIEWBMP4.EXE.MANIFEST"

2004    ICON    EYE.ICO

©³¤U¬O VIEWBMP4.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
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

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  2ah,2eh,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
;***************************************************************************************************
.DATA
hInst   DQ      ?
ofn     OPENFILENAME <>
szFile  DW  256 DUP (0) ;Àx¦s¦ÛGetOpenFileNameªð¦^«áªº§¹¾ãÀɮצWºÙ
;***************************************************************************************************
.CODE
;---------------------------------------------------------------------------------------------------
HookPrc PROC    hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
.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
.else
        xor     rax,rax ;¥¼³B²zªº°T®§¡A¦^¶Ç­È³]¬°¹s
        ret
.endif
        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_HIDEREADONLY
        mov     ofn.lpstrDefExt,rdx
        lea     r10,HookPrc
        mov     ofn.lCustData,0
        mov     ofn.lpfnHook,r10
        mov     ofn.lpTemplateName,0
        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     ;R10D¡×¦ì¤¸¹Ï¼e«×
        mov     r11d,bitmap.bmHeight    ;R11D¡×¦ì¤¸¹Ï°ª«×
    ;­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          ;R10D¡×­pºâ§¹¦¨«áªºµøµ¡¼e«×
        sub     r11d,rcClnt.top           ;R11D¡×­pºâ§¹¦¨«áªºµøµ¡°ª«×
        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
        invoke  DefWindowProc,hWnd,uMsg,wParam,lParam
        ret

.endif
rtn:    xor     eax,eax
        ret
WndProc ENDP
;---------------------------------------------------------------------------------------------------
main    PROC
        LOCAL   hwnd:HWND,msg:MSG,wc:WNDCLASSEX
        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

§â EYE.ICO¡BVIEWBMP4.EXE.MANIFEST¡BVIEWBMP4.RC¡BVIEWBMP4.ASM ¥|­ÓÀɮשñ¦b¦P¤@¤l¥Ø¿ý¡]¨Ò¦p¡uE:\HomePage\SOURCE\Win64\VIEWBMP\¡v¡^¡A¶}±Ò¡u©R¥O´£¥Ü¦r¤¸¡v¡A¿é¤J¤U­±«ü¥O»s§@ VIEWBMP4.EXE¡G

Microsoft Windows [ª©¥» 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\wanker>uasm [Enter] ¡÷°õ¦æ UASM.BAT §å¦¸ÀÉ¡A³]©w²ÕĶ¤Î³sµ²Àô¹Ò¡A¬Ù¤F³\¦h¥´¦r¿é¤J

C:\Users\wanker>SET INCLUDE=C:\UASM\Include

C:\Users\wanker>SET LIB=C:\UASM\lib64

C:\Users\wanker>SET PATH=C:\UASM;C:\UASM\bin64;C:\Windows\system32;C:\Windows;C:
\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Fi
les (x86)\UltraEdit-32

C:\Users\wanker>E:

E:\>CD E:\HOMEPAGE\SOURCE\WIN64
LINK=/SUBSYSTEM:WINDOWS /DEBUG ¡÷¨ì¦¹ UASM.BAT ¤w°õ¦æ§¹²¦

E:\HomePage\SOURCE\Win64>cd VIEWBMP [Enter] ¡÷³]©w VIEWBMP4.ASM ©Ò¦b¤l¥Ø¿ý¬°·í«e¥Ø¿ý

E:\HomePage\SOURCE\Win64\VIEWBMP>uasm64 -win64 VIEWBMP4.ASM [Enter] ¡÷²ÕĶ
UASM v2.56, Oct 27 2022, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.

VIEWBMP4.ASM: 169 lines, 3 passes, 121 ms, 0 warnings, 0 errors ¡÷¨S¦³¿ù»~¡A¦¨¥\²ÕĶ§¹¦¨

E:\HomePage\SOURCE\Win64\VIEWBMP>rc VIEWBMP4.RC [Enter] ¡÷½sĶ¸ê·½´y­zÀÉ
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation.  All rights reserved.
    ¡÷¨S¦³°T®§¡A¥Nªí½sĶ¦¨¥\¨Ã¥Í¦¨ VIEWBMP4.RES ¸ê·½ÀÉ

E:\HomePage\SOURCE\Win64\VIEWBMP>link VIEWBMP4.OBJ VIEWBMP4.RES [Enter] ¡÷³sµ²
Microsoft (R) Incremental Linker Version 14.25.28614.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/SUBSYSTEM:WINDOWS /DEBUG ¡÷¨S¦³°T®§¡A¥Nªí VIEWBMP4.EXE ¦¨¥\»s§@¦n¤F

E:\HomePage\SOURCE\Win64\VIEWBMP>

¦p±ý°õ¦æ VIEWBMP4.EXE¡A¥u¶·¦b©R¥O´£¥Ü¦r¤¸¿é¤J¡uVIEWBMP4¡v¦A«ö¤U¡uENTER¡vÁä´N¥i¥H¨£¨ì°õ¦æµe­±¡CVIEWBMP4 ©Ò»Ý­ì²z¡A¦b«e­±³£¤w±Ô­z¹L¤F¡A³oùØ´N¤£¦h»¡¤F¡C


µù¸Ñ

µù¤@¡G­·®æ¡]Old-Style¡^»PÁ`ºÞ­·®æ¡]Explorer-Style¡^

¡u­·®æ¡vªº¹ï¸Ü²°­º¦¸¥X²{©ó Windows 3.1 ®É´Áªº¡u¶}±ÒÂÂÀÉ¡v»P¡u¥t¦s·sÀÉ¡v¹ï¸Ü²°¡A³oºØ¹ï¸Ü²°¥~Æ[¦p¤U¹Ï¡G ¨ì¤F Windows 95 µoªí¤§«á¡A¤~¦³¤F¡uÁ`ºÞ­·®æ¡v¡C¦b¥~Æ[¤W¡A³o¨âºØ­·®æ³Ì¤jªº®t§O¦b©óÁ`ºÞ­·®æ¥ª°¼¦h¤F¦ì¸m¦C¡]places bar¡A¤]½Ķ¦¨¡u±`¥Î¦ì¸m¦C¡v¡A¨£¹Ï¤Gºñ¦â®Ø¡^¡A°£¦¹¤§¥~Á`ºÞ­·®æÁÙ¦³³\¦h¯àÅý¨Ï¥ÎªÌ§ó§Ö³tªº¿ï¾Ü±`¥Î¨ìªº¸ê®Æ§¨¡C¡]°Ñ¦Ò¹Ï¤@¤Î¹Ï¤G¡^

°£¤F¥~Æ[¤£¦P¤§¥~¡A³B²z³o¨âºØ­·®æªºµ{¦¡½X¤]¤£¦P¡A³o¤j·§¬O¦]¬°¬°¤F¬Û®e©Ê¡C¦b Windows 3.1 ªº®É¥NÁÙ¤£¤ä´©ªøÀɦW¡A©Ò¥H±Ä¥Î­·®æªº¹ï¸Ü²°¡A·|©I¥s¬° Windows 3.1 ©Ò¼¶¼gªºµ{¦¡½X¡C³o¨âºØ­·®æªº¹ï¸Ü²°ÁÙ¦³³\¦h¤£¦P¤§³B¡A¾ã²z¦p¤Uªí¡G

¥\¯à­·®æÁ`ºÞ­·®æ
ªøÀɮצW¤ä´©¤£¤ä´©¤ä´©
¬O§_¥i½Õ¾ã¹ï¸Ü²°¤j¤p§_¬O
¦h¿ïÀÉ®×®ÉÀɦW¤À¹j²Å¸¹ªÅ¥ÕªÅ¦r¤¸
¦Û©w¸q¹ï¸Ü²°­±ªO§¹¥þ¨ú¥N²{¦³¹ï¸Ü²°´O¤J¨ì²{¦³¹ï¸Ü²°

¨º»ò¨t²Î¦p¦ó¨M©w¹ï¸Ü²°¨Ï¥Î­·®æÁÙ¬OÁ`ºÞ­·®æ¡H¥¦¥Ñ©³¤U¤TÂI¨M©w¡G

  1. ¦pªG«ü©w¤F OFN_EXPLORER¡A«h¨Ï¥ÎÁ`ºÞ­·®æ¡C
  2. ¦pªG¥¼«ü©w OFN_EXPLORER¡A¦ý«ü©w¤F OFN_ENABLETEMPLATE¡BOFN_ENABLETEMPLATEHANDLE¡BOFN_ENABLEHOOK ©Î OFN_ALLOWMULTISELECT ¤¤ªº¥ô¤@­ÓºX¼Ð¡A«h¨Ï¥Î­·®æ¡C
  3. ¦pªG¥H¤W±ø¥ó³£¤£²Å¦X¡A«h¨Ï¥ÎÁ`ºÞ­·®æ¡C

¥Ñ¥H¤W¬Ý¨Ó¡A¦pªGÀ³¥Îµ{¦¡»Ý­nÄdºI¨ç¦¡©Î¦Û­q¹ï¸Ü²°­±ªO¡A©Î»Ý­n¬D¿ï¦h­ÓÀɮ׮ɡA¦P®É¤S­n¨Ï¥ÎÁ`ºÞ­·®æ¡A¤~»Ý­n³]¸m OFN_EXPLORER ºX¼Ð¡A§_«h OFN_EXPLORER ºX¼Ð¦¡¥i¥H¬Ù²¤ªº¡C

¦pªGÀ³¥Îµ{¦¡­n¨Ï¥Î­·®æ¡A´N±o¬Ù²¤ OFN_EXPLORER¡A¨Ã´£¦Û­q¹ï¸Ü²°­±ªO©ÎÄdºI¨ç¦¡¡F¦pªG¬J­n¨Ï¥Î­·®æ¡A¤S¤£´£¨Ñ¦Û­q¹ï¸Ü²°­±ªO¡A¨º»ò¥i¥H´£¨Ñ¤@­Ó©l²×ªð¦^ FALSE ªºÄdºI¨ç¦¡§Y¥i¡C

µù¤G¡GWindows ªºª©¥»

¦Û¥Á°ê 74 ¦~¡A·L³nµoªí Winodws 1.0 ¤§«á¶}±Ò Windows §@·~¨t²Îªº¶Àª÷®É¥N¡A¦Ó«áÀHµÛ¨Ï¥ÎªÌ¼W¦h»P®É¥Nºt¶i¡A·L³n°w¹ï¤£¦P¥Î¤á¶i¦Óµo®i¥X³\¦hª©¥»¡C¦pªG¤£¦Ò¼{¦æ°Ê¸Ë¸mªº Windows CE¡AWindows ºØÃþ¤j­P¥i¤À¬°¤TºØ¡G

①¡B16 ¦ì¤¸¡GWindows 1.0¡BWindows 2.x¡BWindows 3.x¡C
②¡BWindows 95 ®Ö¤ßªº Windows¡G
Windows ¦WºÙ959898 SEMe
Windows 95 ®Ö¤ßª©¥»4.00.9504.10.19984.10.22224.90.3000
③¡BNT ®Ö¤ßªº Windows¡G
Windows ¦WºÙ3.13.53.514.02000XPVista788.11011
NT ®Ö¤ßª©¥»3.13.53.514.05.05.16.06.16.26.310.0.1904510.0.26100

¥Ñ¤Wªí¨Ó¬Ý¡A¦b Windows 2000 ©Î¤§«áªºª©¥»¤~¤ä´© pvReserved¡BdwReserved¡BFlagsEx ³o¤T­ÓÄæ¦ì¡FWindows 95/98/98SE/Me ³£¤£¤ä´©¡C