Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

319 lines
17 KiB

  1. #include "winfile.h"
  2. #include "wfcopy.h"
  3. //#include "winfile.rcv"
  4. BITMAPS BITMAP PRELOAD bitmap.bmp
  5. APPICON ICON PRELOAD winfile.ico
  6. TREEICON ICON PRELOAD wftree.ico
  7. DIRICON ICON PRELOAD wfdir.ico
  8. TREEDIRICON ICON PRELOAD wftrdir.ico
  9. SPLITCURSOR CURSOR PRELOAD split.cur
  10. SINGLEMOVECURSOR CURSOR smove.cur
  11. MULTMOVECURSOR CURSOR mmove.cur
  12. SINGLECOPYCURSOR CURSOR scopy.cur
  13. MULTCOPYCURSOR CURSOR mcopy.cur
  14. WFACCELTABLE ACCELERATORS PRELOAD
  15. BEGIN
  16. VK_RETURN, IDM_OPEN, NOINVERT, VIRTKEY
  17. VK_RETURN, IDM_OPEN, NOINVERT, VIRTKEY, SHIFT
  18. VK_F7, IDM_MOVE, VIRTKEY
  19. VK_F8, IDM_COPY, VIRTKEY
  20. VK_DELETE, IDM_DELETE, VIRTKEY
  21. VK_F5, IDM_CASCADE, NOINVERT, VIRTKEY, SHIFT
  22. VK_F4, IDM_TILE, NOINVERT, VIRTKEY, SHIFT
  23. VK_F5, IDM_REFRESH, NOINVERT, VIRTKEY
  24. VK_F1, IDM_HELPINDEX, VIRTKEY
  25. "+", IDM_EXPONE, NOINVERT
  26. "*", IDM_EXPSUB, NOINVERT
  27. "8", IDM_EXPALL, NOINVERT, VIRTKEY, CONTROL, SHIFT
  28. VK_MULTIPLY,IDM_EXPALL, NOINVERT, VIRTKEY, CONTROL
  29. "-", IDM_COLLAPSE, NOINVERT
  30. VK_RETURN, IDM_ATTRIBS, NOINVERT, VIRTKEY, ALT
  31. END
  32. FRAMEMENU MENU PRELOAD
  33. BEGIN
  34. POPUP "&Object"
  35. BEGIN
  36. MENUITEM "&Info...\tEnter", IDM_OPEN
  37. MENUITEM SEPARATOR
  38. MENUITEM "E&xit", IDM_EXIT
  39. END
  40. POPUP "&Tree"
  41. BEGIN
  42. MENUITEM "E&xpand One Level\t+", IDM_EXPONE
  43. MENUITEM "Expand &Branch\t*", IDM_EXPSUB
  44. MENUITEM "Expand &All\tCtrl+*", IDM_EXPALL
  45. MENUITEM "&Collapse Branch\t-", IDM_COLLAPSE
  46. MENUITEM SEPARATOR
  47. MENUITEM "&Indicate Expandable Branches", IDM_ADDPLUSES
  48. END
  49. POPUP "&View"
  50. BEGIN
  51. MENUITEM "T&ree and Directory", IDM_BOTH
  52. MENUITEM "Tr&ee Only", IDM_TREEONLY
  53. MENUITEM "Directory &Only", IDM_DIRONLY
  54. MENUITEM SEPARATOR
  55. MENUITEM "Sp&lit" IDM_SPLIT
  56. END
  57. POPUP "&Options"
  58. BEGIN
  59. MENUITEM "&Font..." IDM_FONT
  60. MENUITEM SEPARATOR
  61. MENUITEM "&Status Bar", IDM_STATUSBAR
  62. MENUITEM "&Minimize on Use", IDM_MINONRUN
  63. MENUITEM "Save Settings on &Exit", IDM_SAVESETTINGS
  64. END
  65. POPUP "&Window"
  66. BEGIN
  67. MENUITEM "&New Window", IDM_NEWWINDOW
  68. MENUITEM "&Cascade\tShift+F5", IDM_CASCADE
  69. MENUITEM "&Tile\tShift+F4", IDM_TILE
  70. MENUITEM "&Arrange Icons", IDM_ARRANGE
  71. MENUITEM "&Refresh\tF5", IDM_REFRESH
  72. END
  73. POPUP "&Help"
  74. BEGIN
  75. MENUITEM "&About...", IDM_ABOUT
  76. END
  77. END
  78. /* 0....5....1....56...2....5....3.2..5....4....5....5....6....5....7....5....8....5....9....5....0....5....1....5....2....5..8 */
  79. STRINGTABLE DISCARDABLE PRELOAD
  80. BEGIN
  81. IDS_ENDSESSION "Exit Windows" /* 32 */
  82. IDS_ENDSESSIONMSG "This will end your Windows session." /* 128 */
  83. IDS_COPYDISK "Copy Disk" /* 32 */
  84. IDS_INSERTDEST "Insert destination disk." /* 128 */
  85. IDS_INSERTSRC "Insert source disk." /* 128 */
  86. IDS_INSERTSRCDEST "Insert source and destination disks." /* 128 */
  87. IDS_FORMATTINGDEST "Formatting destination disk." /* 128 */
  88. IDS_COPYDISKERR "Copy Disk Error" /* 32 */
  89. IDS_COPYDISKERRMSG "Unable to copy disk." /* 128 */
  90. IDS_COPYSRCDESTINCOMPAT "Source and destination drives are incompatible." /* 128 */
  91. IDS_PERCENTCOMP "%d%% completed" /* 32 */
  92. IDS_CREATEROOT "Creating root directory" /* 32 */
  93. IDS_COPYSYSFILES "Copying system objects" /* 32 */
  94. IDS_FORMATERR "Format Disk Error" /* 32 */
  95. IDS_FORMATQUICKFAILURE "Cannot quick format.\n\nContinue with normal format?"
  96. IDS_FORMATERRMSG "Cannot format disk." /* 128 */
  97. // IDS_FORMATCURERR "You cannot format the current drive." /* 128 */
  98. IDS_FORMATCOMPLETE "Format Complete" /* 32 */
  99. IDS_FORMATANOTHER "%ld bytes total disk space\n%ld bytes available on disk\n\nDo you want to format another disk?" /* 128 */
  100. IDS_SYSDISK "Make System Disk"
  101. IDS_SYSDISKRUSURE "Are you sure you want to copy system objects onto the disk in drive %c:?"
  102. IDS_SYSDISKERR "System Disk Error"
  103. IDS_SYSDISKNOFILES "The DOS startup drive does not contain system objects or is not available."
  104. IDS_SYSDISKSAMEDRIVE "Cannot copy system objects to the DOS startup drive."
  105. IDS_SYSDISKADDERR "Cannot add system objects to this disk.\n\nPlease verify that a formatted disk is present in the drive."
  106. IDS_NETERR "Network Error" /* 32 */
  107. IDS_NETDISCONWINERR "This drive contains the Windows system objects and cannot be disconnected." /* 128 */
  108. IDS_NETDISCONOPEN "Cannot disconnect network drive.\n\nObjects are open on this drive."
  109. IDS_ATTRIBERR "Cannot change attributes.\n\nPlease verify that the disk is not write-protected."
  110. IDS_MAKEDIRERR "Cannot create directory.\n\nPlease verify that the disk is not write-protected."
  111. IDS_MAKEDIREXISTS "Directory already exists."
  112. IDS_LABELDISKERR "Cannot label disk.\n\nPlease verify that the disk is not write-protected, and that the label is valid.\
  113. Labels cannot contain the following characters:\n[space] * ? / \\ | . , ; : + = [ ] ( ) & ^ < > "" "
  114. IDS_SEARCHNOMATCHES "No matching objects were found."
  115. IDS_SEARCHREFRESH "The contents of this drive has changed. Do you want to update the Search Results window?"
  116. IDS_DRIVETEMP "Drive %c:%c"
  117. IDS_EXECERRTITLE, "Cannot Execute Object"
  118. IDS_PRINTERRTITLE, "Cannot Print Object"
  119. IDS_UNKNOWNMSG, "Unexpected error: %d."
  120. IDS_NOMEMORYMSG, "Not enough memory to start the specified application.\n\nClose one or more applications and try again." /* 128 */
  121. IDS_FILENOTFOUNDMSG, "Cannot find object (or one of its components).\n\nPlease verify that the path and object name are correct and that all required libraries are available."
  122. IDS_BADPATHMSG, "The specified path is invalid." /* 128 */
  123. IDS_MANYOPENFILESMSG, "Too many objects are currently in use.\n\nClose one or more applications and try again." /* 128 */
  124. IDS_NOASSOCMSG, "No application is associated with this data object.\n\nChoose Associate from the Object menu to create an association." /* 128 */
  125. IDS_ASSOCINCOMPLETE, "The association information for this object type is incomplete.\n\nCheck the registration information for this object type."
  126. IDS_MULTIPLEDSMSG, "Cannot start more than one copy of the specified program." /* 128 */
  127. IDS_OS2APPMSG "The specified application is not a Windows or DOS program." /* 128 */
  128. IDS_NEWWINDOWSMSG "This application requires a newer version of Microsoft Windows." /* 128 */
  129. IDS_PMODEONLYMSG "This application requires Standard or Enhanced Mode Windows." /* 128 */
  130. IDS_DDEFAIL "An error occurred sending the command to the application." /* 128 */
  131. IDS_COMPRESSEDEXE "This object is compressed.\n\nPlease uncompress it and try again."
  132. IDS_MOUSECONFIRM, "Confirm Mouse Operation" /* 32 */
  133. IDS_COPYMOUSECONFIRM, "Are you sure you want to copy the selected objects or directories?"
  134. IDS_MOVEMOUSECONFIRM, "Are you sure you want to move the selected objects or directories?"
  135. IDS_EXECMOUSECONFIRM, "Are you sure you want to start %s using %s as the initial object?" /* 128 */
  136. IDS_WINFILE, "Object Viewer" /* 32 */
  137. IDS_TREETITLE, "Directory Tree" /* 32 */
  138. IDS_SEARCHTITLE, "Search Results: " /* 32 */
  139. IDS_TOOMANYTITLE, "Too Many Objects" /* 32 */
  140. IDS_OOMTITLE, "Object Manager - Out of Memory" /* 32 */
  141. IDS_OOMREADINGDIRMSG, "Unable to read entire directory. Only a partial listing will be displayed." /* 128 */
  142. IDS_PRINTFNF "The object to be printed cannot be found." /* 128 */
  143. IDS_PRINTMEMORY "Not enough memory to print.\n\nClose one or more applications and try again." /* 128 */
  144. IDS_PRINTDISK "Not enough disk space to print.\n\nDelete one or more objects to increase disk space and try again." /* 128 */
  145. IDS_PRINTERROR "An error has occurred while printing.\n\nPlease verify that the printer is properly configured and selected." /* 128 */
  146. IDS_PRINTONLYONE "Cannot print multiple objects.\n\nPlease select only one object and try again." /* 128 */
  147. IDS_CURDIRIS, "Current Directory: %s" /* 128 */
  148. IDS_COPY, "Copy" /* 32 */
  149. IDS_RENAME, "Rename" /* 32 */
  150. IDS_FORMAT, "Format Disk" /* 32 */
  151. IDS_FORMATSELDISK, "Select the disk to format." /* 128 */
  152. // IDS_MAKESYSDISK, "Make System Disk" /* 32 */
  153. IDS_CREATINGMSG, "Creating:" /* 32 */
  154. IDS_REMOVINGDIRMSG, "Removing:" /* 32 */
  155. IDS_REMOVINGMSG, "Removing..." /* 32 */
  156. IDS_COPYINGMSG, "Copying:" /* 32 */
  157. IDS_OPENINGMSG, "Opening..." /* 32 */
  158. IDS_CLOSINGMSG, "Closing..." /* 32 */
  159. IDS_RENAMINGMSG, "Renaming..." /* 32 */
  160. IDS_MOVINGMSG, "Moving..." /* 32 */
  161. IDS_DELETINGMSG, "Deleting..." /* 32 */
  162. IDS_PRINTINGMSG, "Printing: %s" /* 32 */
  163. IDS_NOSUCHDRIVE, "The drive %c: does not exist." /* 128 */
  164. IDS_DRIVENOTREADY, "There is no disk in drive %c:.\n\nPlease insert a disk and try again."
  165. IDS_UNFORMATTED, "The disk in drive %c: is not formatted.\n\nDo you want to format it now?"
  166. IDS_STATUSMSG, "Total %d object(s)" /* 128 */
  167. IDS_STATUSMSG2, "Selected %d object(s)" /* 128 */
  168. IDS_DRIVEFREE, "" /* 128 */
  169. IDS_TREEABORT, "Incomplete Tree Displayed" /* 128 */
  170. IDS_DIRSREAD, "Directories read: %d " /* 32 */
  171. IDS_SEARCHMSG, "%d object(s) found" /* 128 */
  172. IDS_SELECTEDFILES, "the selected objects" /* 32 */
  173. /* These strings are used for generating error messages
  174. * from the Copy, Move, and Delete code. */
  175. IDS_COPYERROR + FUNC_COPY "Error Copying Object"
  176. IDS_COPYERROR + FUNC_MOVE "Error Moving Object"
  177. IDS_COPYERROR + FUNC_DELETE "Error Deleting Object"
  178. IDS_COPYERROR + FUNC_RENAME "Error Renaming Object"
  179. IDS_COPYERROR + FUNC_SETDRIVE "Error Selecting Drive"
  180. IDS_COPYERROR + FUNC_EXPAND "Error Reading Directory"
  181. IDS_COPYERROR + FUNC_LABEL "Error Labeling Disk"
  182. /* The first %s is replaced by a object name. The second %s is replaced
  183. * by one of the "reasons" below. */
  184. IDS_VERBS + FUNC_COPY "Cannot copy %s: %s"
  185. IDS_VERBS + FUNC_MOVE "Cannot move %s: %s"
  186. IDS_VERBS + FUNC_DELETE "Cannot delete %s: %s"
  187. IDS_VERBS + FUNC_RENAME "Cannot rename %s: %s"
  188. IDS_ACTIONS + 1 "Cannot create directory %s: %s"
  189. IDS_ACTIONS + 2 "Cannot remove directory %s: %s"
  190. IDS_REPLACING "Cannot replace %s: %s"
  191. IDS_CREATING "Cannot create %s: %s"
  192. #if 1
  193. // internal type errors
  194. IDS_REASONS+DE_INVFUNCTION "ERR: inv dos func"
  195. IDS_REASONS+DE_NOHANDLES "ERR: no handles"
  196. IDS_REASONS+DE_INVHANDLE "ERR: inv handle"
  197. IDS_REASONS+DE_INVFILEACCESS "ERR: inv object acc"
  198. IDS_REASONS+DE_NOTSAMEDEVICE "ERR: not same dev"
  199. IDS_REASONS+DE_HOWDIDTHISHAPPEN "ERR: inv oper"
  200. #endif
  201. // regular dos errors
  202. IDS_REASONS+DE_FILENOTFOUND "Cannot find object.\n\nPlease verify that the correct path and object name are given."
  203. IDS_REASONS+DE_PATHNOTFOUND "Cannot find path.\n\nPlease verify that the correct path is given."
  204. IDS_REASONS+DE_ACCESSDENIED "Access Denied.\n\nPlease verify that the disk is not full or write-protected."
  205. IDS_REASONS+DE_INSMEM "Not enough memory.\n\nClose one or more applications and try again."
  206. IDS_REASONS+DE_DELCURDIR "Cannot remove the current directory (internal error)."
  207. IDS_REASONS+DE_NODIRENTRY "Directory is empty."
  208. // extended dos errors
  209. IDS_REASONS+DE_WRITEPROTECTED "The disk is write-protected.\n\nDisable the write-protection on this disk or use another disk, and try again."
  210. IDS_REASONS+DE_ACCESSDENIEDNET "Network Access Denied. Not enough privilege to perform this operation."
  211. // our internal errors
  212. IDS_REASONS+DE_NODISKSPACE "Not enough disk space.\n\nDelete one or more objects to increase disk space and try again."
  213. IDS_REASONS+DE_SAMEFILE "Source and destination are the same."
  214. IDS_REASONS+DE_MANYSRC1DEST "Select only one object to rename, or use DOS wildcards (for example, *.TXT) to rename a group of objects with similar names."
  215. IDS_REASONS+DE_DIFFDIR "Cannot rename to a different directory or disk."
  216. IDS_REASONS+DE_ROOTDIR "Root directory (internal error)."
  217. IDS_REASONS+DE_DESTSUBTREE "Destination is a subtree of the source."
  218. IDS_REASONS+DE_WINDOWSFILE "Object in use by Windows."
  219. IDS_REASONS+DE_ACCESSDENIEDSRC "Access Denied. Source object in use."
  220. IDS_REASONS+DE_PATHTODEEP "Path too deep."
  221. IDS_REASONS+DE_MANYDEST "Specify only one object or directory in the To box. Or, if you want to specify a group of objects, use DOS wildcards (for example, *.TXT)."
  222. IDS_DESTFULL "Destination drive full.\n\nPlease insert a new disk to continue."
  223. IDS_WRITEPROTECTFILE "This is a system, hidden or read-only object."
  224. IDS_COPYINGTITLE "Copying..."
  225. IDS_12MB "1.2 MB"
  226. IDS_360KB "360 KB"
  227. IDS_144MB "1.44 MB"
  228. IDS_720KB "720 KB"
  229. IDS_288MB "2.88 MB"
  230. IDS_DEVICECAP "Drive Capacity"
  231. IDS_FFERR_MEM "Not enough memory."
  232. IDS_FFERR_SRCEQDST "Cannot format the DOS startup drive."
  233. IDS_FFERR_SECSIZE "The DOS startup drive has an invalid sector size."
  234. IDS_FFERR_DRIVETYPE "Unknown drive type."
  235. // IDS_FFERR_BADTRACK "Failed to format all tracks.\n\nPlease verify that disk is not write-protected, and is inserted properly in the drive."
  236. // IDS_FFERR_WRITEBOOT "Failed to create boot sector.\n\nPlease verify that disk is not write-protected, and is inserted properly in the drive."
  237. // IDS_FFERR_WRITEFAT "Failed to create object allocation table."
  238. // IDS_FFERR_WRITEROOT "Failed to create root directory."
  239. IDS_FFERR_SYSFILES "Failed to transfer system objects."
  240. IDS_FFERR_MEDIASENSE "This disk is capable of being formatted at a capacity of %s. Continue formatting at this capacity?"
  241. IDS_FFERR "Cannot format disk.\n\nPlease verify that the disk is in the drive and not write-protected, damaged, or of wrong density rating."
  242. IDS_FORMATCONFIRM "Formatting will erase ALL data from your disk. Are you sure that you want to format the disk in Drive %c:?"
  243. IDS_FORMATCONFIRMTITLE "Confirm Format Disk"
  244. IDS_DISKCOPYCONFIRM "This operation will erase ALL data from the destination disk. Are you sure that you want to continue?"
  245. IDS_DISKCOPYCONFIRMTITLE "Confirm Copy Disk"
  246. IDS_CLOSE "&Close" // goes on Selection dialog
  247. IDS_UNDELETE "&Undelete..."
  248. IDS_CONNECT "Connect &Network Drive..."
  249. IDS_DISCONNECT "&Disconnect Network Drive..."
  250. IDS_CONNECTIONS "&Network Connections..."
  251. IDS_PATHNOTTHERE "Directory %s does not exist.\n\nCreate it?"
  252. IDS_PROGRAMS "Programs#*.exe;*.pif;*.com;*.bat#All Objects (*.*)#*.*#"
  253. IDS_ASSOCIATE "Browse"
  254. IDS_RUN "Run"
  255. IDS_WINHELPERR "Unable to show help information."
  256. IDS_NOEXEASSOC "Objects with the extension %s are programs and can not be associated."
  257. IDS_ASSOCNOTEXE "%s is not a program and can not be associated with an extension."
  258. IDS_ASSOCNONE "(None)"
  259. IDS_NOFILES "No Objects Found."
  260. END
  261. #include "winfile.dlg"
  262. #include "dlg.dlg"
  263. #include <windows.h>
  264. #include <ntverp.h>
  265. #define VER_FILETYPE VFT_APP
  266. #define VER_FILESUBTYPE VFT2_UNKNOWN
  267. #define VER_FILEDESCRIPTION_STR "Microsoft\256 Windows Object Viewer"
  268. #define VER_INTERNALNAME_STR "winobj.exe"
  269. #define VER_ORIGINALFILENAME_STR "winobj.exe"
  270. #include <common.ver>