Leaked source code of windows server 2003
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.

1036 lines
36 KiB

  1. /****************************************************************************/
  2. /* */
  3. /* WINFILE.H - */
  4. /* */
  5. /* Include for WINFILE program */
  6. /* */
  7. /****************************************************************************/
  8. #define NOCOMM
  9. #define WIN31
  10. #include <windows.h>
  11. #include <port1632.h>
  12. #include <winuserp.h>
  13. #include <setjmp.h>
  14. #include <string.h>
  15. #include <memory.h>
  16. #include <shellapi.h>
  17. #include <shlapip.h>
  18. #include "wfext.h"
  19. #include "wfhelp.h"
  20. #include "dbg.h"
  21. #undef CheckEscapes
  22. #define DwordAlign(cb) ((cb + 3) & ~3)
  23. typedef HWND NEAR *PHWND;
  24. #define SIZENOMDICRAP 944
  25. #define MAXDOSFILENAMELEN 12+1 // includes the NULL
  26. #define MAXDOSPATHLEN (68+MAXDOSFILENAMELEN) // includes the NULL
  27. #define MAXLFNFILENAMELEN 260
  28. #define MAXLFNPATHLEN 260
  29. #define MAXFILENAMELEN MAXLFNFILENAMELEN
  30. #define MAXPATHLEN MAXLFNPATHLEN
  31. #define MAXTITLELEN 32
  32. #define MAXMESSAGELEN (50 + MAXFILENAMELEN * 2)
  33. #include "wfdisk.h"
  34. // struct for volume info
  35. #define MAX_VOLNAME 12
  36. #define MAX_FILESYSNAME 12
  37. typedef struct _VOLINFO {
  38. DWORD dwVolumeSerialNumber;
  39. DWORD dwMaximumComponentLength;
  40. DWORD dwFileSystemFlags;
  41. DWORD dwDriveType;
  42. CHAR szVolumeName[MAX_VOLNAME];
  43. CHAR szFileSysName[MAX_FILESYSNAME];
  44. } VOLINFO;
  45. /*--------------------------------------------------------------------------*/
  46. /* */
  47. /* Function Templates */
  48. /* */
  49. /*--------------------------------------------------------------------------*/
  50. BOOL APIENTRY FileCDR(FARPROC);
  51. VOID APIENTRY KernelChangeFileSystem(LPSTR,WORD);
  52. /* WFDOSDIR.ASM */
  53. DWORD APIENTRY GetExtendedError(VOID);
  54. VOID APIENTRY DosGetDTAAddress(VOID);
  55. VOID APIENTRY DosResetDTAAddress(VOID);
  56. BOOL APIENTRY DosFindFirst(LPDOSDTA, LPSTR, WORD);
  57. BOOL APIENTRY DosFindNext(LPDOSDTA);
  58. BOOL APIENTRY DosDelete(LPSTR);
  59. INT APIENTRY GetCurrentVolume(LPSTR);
  60. INT APIENTRY UpdateDriveList(VOID);
  61. WORD APIENTRY GetFirstCDROMDrive(VOID);
  62. // WORD APIENTRY GetFileAttributes(LPSTR);
  63. // WORD APIENTRY SetFileAttributes(LPSTR, WORD);
  64. DWORD APIENTRY GetFreeDiskSpace(WORD);
  65. DWORD APIENTRY GetTotalDiskSpace(WORD);
  66. INT APIENTRY ChangeVolumeLabel(INT, LPSTR);
  67. INT APIENTRY GetVolumeLabel(INT, LPSTR, BOOL);
  68. INT APIENTRY DeleteVolumeLabel(INT);
  69. INT APIENTRY CreateVolumeFile(LPSTR);
  70. INT APIENTRY CreateVolumeLabel(INT, LPSTR);
  71. INT APIENTRY MySetVolumeLabel(INT, BOOL, LPSTR);
  72. INT APIENTRY WF_CreateDirectory(HWND, LPSTR);
  73. WORD APIENTRY FileCopy(LPSTR szSource, LPSTR szDest);
  74. /* WFDISK.C */
  75. DWORD APIENTRY LongShift(DWORD dwValue, WORD wCount);
  76. VOID APIENTRY SetDASD(WORD, BYTE);
  77. LPDBT APIENTRY GetDBT(VOID);
  78. HANDLE APIENTRY BuildDevPB(PDevPB);
  79. VOID APIENTRY DiskReset(VOID);
  80. WORD APIENTRY GetDPB(WORD, PDPB);
  81. VOID APIENTRY SetDPB(WORD, PBPB, PDPB);
  82. INT APIENTRY ModifyDPB(WORD);
  83. INT APIENTRY MyInt25(WORD, LPSTR, WORD, WORD);
  84. INT APIENTRY MyReadWriteSector(LPSTR, WORD, WORD, WORD, WORD, WORD);
  85. INT APIENTRY GenericReadWriteSector(LPSTR, WORD, WORD, WORD, WORD, WORD);
  86. VOID APIENTRY lStrucCopy(LPSTR, LPSTR, WORD);
  87. INT APIENTRY FormatTrackHead(WORD, WORD, WORD, WORD, LPSTR);
  88. INT APIENTRY GenericFormatTrack(WORD, WORD, WORD, WORD, LPSTR);
  89. INT APIENTRY MyGetDriveType(WORD);
  90. INT APIENTRY WriteBootSector(WORD, WORD, PBPB, LPSTR);
  91. WORD APIENTRY GetDriveCapacity(WORD);
  92. DWORD APIENTRY DreamUpSerialNumber(VOID);
  93. DWORD APIENTRY GetClusterInfo(WORD);
  94. DWORD APIENTRY ReadSerialNumber(INT, LPSTR);
  95. INT APIENTRY ModifyVolLabelInBootSec(INT, LPSTR, DWORD, LPSTR);
  96. LPSTR GetRootPath(WORD wDrive);
  97. /* WFUTIL.C */
  98. INT APIENTRY GetBootDisk(VOID);
  99. VOID APIENTRY FixAnsiPathForDos(LPSTR szPath);
  100. VOID APIENTRY RefreshWindow(HWND hwndActive);
  101. BOOL APIENTRY IsLastWindow(VOID);
  102. //LPSTR APIENTRY AddCommas(LPSTR szBuf, DWORD dw);
  103. VOID APIENTRY GetVolShare(WORD wDrive, LPSTR szVolShare);
  104. VOID APIENTRY InvalidateChildWindows(HWND hwnd);
  105. BOOL APIENTRY IsValidDisk(INT iDrive);
  106. LPSTR APIENTRY GetSelection(INT iSelType);
  107. LPSTR APIENTRY GetNextFile(LPSTR pCurSel, LPSTR szFile, INT size);
  108. VOID APIENTRY SetWindowDirectory(VOID);
  109. VOID APIENTRY SetDlgDirectory(HWND hDlg, PSTR pszPath);
  110. VOID APIENTRY WritePrivateProfileBool(LPSTR szKey, BOOL bParam);
  111. VOID APIENTRY WritePrivateProfileInt(LPSTR szKey, INT wParam);
  112. BOOL APIENTRY IsWild(LPSTR lpszPath);
  113. VOID APIENTRY AddBackslash(LPSTR lpszPath);
  114. VOID APIENTRY StripBackslash(LPSTR lpszPath);
  115. VOID APIENTRY StripFilespec(LPSTR lpszPath);
  116. VOID APIENTRY StripPath(LPSTR lpszPath);
  117. LPSTR APIENTRY GetExtension(LPSTR pszFile);
  118. BOOL APIENTRY FindExtensionInList(LPSTR pszExt, LPSTR pszList);
  119. INT APIENTRY MyMessageBox(HWND hWnd, WORD idTitle, WORD idMessage, WORD wStyle);
  120. WORD APIENTRY ExecProgram(LPSTR,LPSTR,LPSTR,BOOL);
  121. BOOL APIENTRY IsProgramFile(LPSTR lpszPath);
  122. BOOL APIENTRY IsDocument(LPSTR lpszPath);
  123. BOOL APIENTRY IsRemovableDrive(INT);
  124. BOOL APIENTRY IsRemoteDrive(INT);
  125. VOID APIENTRY SetMDIWindowText(HWND hWnd, LPSTR szTitle);
  126. INT APIENTRY GetMDIWindowText(HWND hWnd, LPSTR szTitle, INT size);
  127. BOOL APIENTRY ResizeSplit(HWND hWnd, INT dxSplit);
  128. /* WFDIRSRC.C */
  129. HCURSOR APIENTRY GetMoveCopyCursor(VOID);
  130. VOID APIENTRY SetLBFont(HWND hWnd, HWND hwndLB, HANDLE hFont);
  131. VOID APIENTRY DrawItem(LPDRAWITEMSTRUCT lpLBItem, LPSTR szLine, DWORD dwAttrib, BOOL bHilight, WORD *pTabs);
  132. VOID APIENTRY DSDragLoop(HWND hwndLB, WPARAM wParam, LPDROPSTRUCT lpds, BOOL bSearch);
  133. VOID APIENTRY DSRectItem(HWND hwndLB, INT iSel, BOOL bFocusOn, BOOL bSearch);
  134. INT APIENTRY DSTrackPoint(HWND hWnd, HWND hwndLB, WPARAM wParam, LPARAM lParam, BOOL bSearch);
  135. VOID APIENTRY DSSetSelection(HWND hwndLB, BOOL bSelect, LPSTR szSpec, BOOL bSearch);
  136. INT APIENTRY FixTabsAndThings(HWND hwndLB, WORD *pwTabs, INT iMaxWidthFileName, WORD wViewOpts);
  137. VOID APIENTRY UpdateStatus(HWND hWnd);
  138. BOOL APIENTRY CompactPath(HDC hdc, LPSTR szPath, WORD dx);
  139. VOID APIENTRY SetActiveDirectory(VOID);
  140. VOID APIENTRY GetInternational(VOID);
  141. VOID APIENTRY BuildDocumentString(VOID);
  142. BOOL APIENTRY LoadBitmaps(VOID);
  143. BOOL APIENTRY InitFileManager(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, INT nCmdShow);
  144. VOID APIENTRY InitDriveBitmaps(VOID);
  145. VOID APIENTRY InitExtensions(VOID);
  146. VOID APIENTRY FreeFileManager(VOID);
  147. VOID APIENTRY DeleteBitmaps(VOID);
  148. BOOL APIENTRY FormatFloppy(HWND hWnd, WORD nDestDrive, INT iCapacity, BOOL bMakeSysDisk, BOOL bQuick);
  149. BOOL APIENTRY HasSystemFiles(WORD iDrive);
  150. BOOL APIENTRY MakeSystemDiskette(WORD nDestDrive, BOOL bEmptyDisk);
  151. INT APIENTRY CopyDiskette(HWND hwnd, WORD nSrcDrive, WORD nDestDrive);
  152. VOID APIENTRY ChangeFileSystem(WORD wOper, LPSTR lpPath, LPSTR lpTo);
  153. WORD APIENTRY DMMoveCopyHelper(LPSTR pFrom, LPSTR pTo, BOOL bCopy);
  154. WORD APIENTRY WFMoveCopyDriver(LPSTR pFrom, LPSTR pTo, WORD wFunc);
  155. WORD APIENTRY IsTheDiskReallyThere(HWND hwnd, register LPSTR pPath, WORD wFunc);
  156. WORD APIENTRY WFPrint(LPSTR szFile);
  157. VOID APIENTRY GetSelectedDirectory(WORD iDrive, PSTR pszDir);
  158. VOID APIENTRY SaveDirectory(PSTR pszDir);
  159. INT APIENTRY GetSelectedDrive(VOID);
  160. VOID APIENTRY GetTextStuff(HDC hdc);
  161. INT APIENTRY GetHeightFromPointsString(LPSTR szPoints);
  162. INT APIENTRY GetDrive(HWND hwnd, POINT pt);
  163. VOID APIENTRY CheckSlashies(LPSTR);
  164. VOID APIENTRY SetSourceDir(LPDROPSTRUCT lpds); // wfdir.c
  165. VOID APIENTRY UpdateSelection(HWND hwndLB);
  166. DWORD APIENTRY GetVolShareExtent(HWND hWnd); // wfdrives.c
  167. BOOL APIENTRY WFQueryAbort(VOID);
  168. VOID APIENTRY EnableFSC( VOID );
  169. VOID APIENTRY DisableFSC( VOID );
  170. VOID APIENTRY ResizeWindows(HWND hwndParent,WORD dxWindow, WORD dyWindow);
  171. BOOL APIENTRY CheckDrive(HWND hwnd, INT nDrive);
  172. INT_PTR APIENTRY FrameWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  173. BOOL APIENTRY AppCommandProc(WORD id);
  174. INT_PTR APIENTRY TreeWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  175. INT_PTR APIENTRY DriveWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  176. INT_PTR APIENTRY DrivesWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  177. INT_PTR APIENTRY VolumeWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  178. INT_PTR APIENTRY TreeChildWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  179. INT_PTR APIENTRY TreeControlWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  180. INT_PTR APIENTRY DirWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  181. INT_PTR APIENTRY SearchWndProc(HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam);
  182. INT_PTR APIENTRY DrivesDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  183. INT_PTR APIENTRY AssociateDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  184. INT_PTR APIENTRY SearchDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  185. INT_PTR APIENTRY RunDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  186. INT_PTR APIENTRY SelectDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  187. INT_PTR APIENTRY FontDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  188. INT_PTR APIENTRY SuperDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  189. INT_PTR APIENTRY AttribsDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  190. INT_PTR APIENTRY MakeDirDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  191. INT_PTR APIENTRY ExitDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  192. INT_PTR APIENTRY DiskLabelDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  193. INT_PTR APIENTRY ChooseDriveDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  194. INT_PTR APIENTRY FormatDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  195. INT_PTR APIENTRY Format2DlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  196. INT_PTR APIENTRY ProgressDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  197. INT_PTR APIENTRY DiskCopyDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  198. INT_PTR APIENTRY DiskCopy2DlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  199. INT_PTR APIENTRY ConnectDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  200. INT_PTR APIENTRY PreviousDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  201. INT_PTR APIENTRY OtherDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  202. INT_PTR APIENTRY SortByDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  203. INT_PTR APIENTRY IncludeDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  204. INT_PTR APIENTRY ConfirmDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  205. INT_PTR APIENTRY AboutDlgProc(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM lParam);
  206. VOID APIENTRY SaveWindows(HWND hwndMain);
  207. INT APIENTRY PutDate(LPFILETIME lpftDate, LPSTR szStr);
  208. INT APIENTRY PutTime(LPFILETIME lpftTime, LPSTR szStr);
  209. INT APIENTRY PutSize(DWORD dwSize, LPSTR szOutStr);
  210. INT APIENTRY PutAttributes(register DWORD dwAttribute, register LPSTR szStr);
  211. BOOL APIENTRY CreateSavedWindows(VOID);
  212. HWND APIENTRY CreateDirWindow(register LPSTR szPath, BOOL bReplaceOpen, HWND hwndActive);
  213. HWND APIENTRY CreateTreeWindow(LPSTR szDir, INT dxSplit);
  214. VOID APIENTRY GetTreeWindows(HWND hwnd, PHWND phwndTree, PHWND phwndDir, PHWND hwndDrives);
  215. HWND APIENTRY GetTreeFocus(HWND hWnd);
  216. VOID APIENTRY SetTreeCase(HWND hWnd);
  217. INT APIENTRY GetSplit(HWND hwnd);
  218. HWND APIENTRY GetMDIChildFromDecendant(HWND hwnd);
  219. INT APIENTRY GetDrive(HWND hwnd, POINT pt);
  220. WORD APIENTRY IsNetDrive(INT iDrive);
  221. WORD APIENTRY IsCDRomDrive(INT iDrive);
  222. BOOL APIENTRY IsRamDrive(INT wDrive);
  223. WORD APIENTRY WFGetConnection(LPSTR,LPSTR,BOOL);
  224. WORD APIENTRY NetCheck(LPSTR,WORD);
  225. VOID APIENTRY InitExtensions(VOID);
  226. VOID APIENTRY NewTree(INT iDrive, HWND hWnd);
  227. INT APIENTRY FormatDiskette(HWND hwnd);
  228. VOID APIENTRY NewFont(VOID);
  229. HWND APIENTRY GetRealParent(HWND hwnd);
  230. VOID APIENTRY WFHelp(HWND hwnd);
  231. LRESULT APIENTRY MessageFilter(INT nCode, WPARAM wParam, LPARAM lParam);
  232. VOID APIENTRY UpdateConnections(VOID);
  233. VOID APIENTRY FillVolumeInfo(INT iVol);
  234. WORD APIENTRY WFCopy(PSTR,PSTR);
  235. WORD APIENTRY StartCopy(VOID);
  236. WORD APIENTRY EndCopy(VOID);
  237. VOID APIENTRY CopyAbort(VOID);
  238. VOID APIENTRY QualifyPath(PSTR);
  239. VOID APIENTRY wfYield(VOID);
  240. LONG APIENTRY lmul(WORD w1, WORD w2);
  241. #define DEBUGF(foo)
  242. #define STKCHK()
  243. #define TA_LOWERCASE 0x01
  244. #define TA_BOLD 0x02
  245. #define TA_ITALIC 0x04
  246. #ifndef NO_WF_GLOBALS
  247. /*--------------------------------------------------------------------------*/
  248. /* */
  249. /* Global Externs */
  250. /* */
  251. /*--------------------------------------------------------------------------*/
  252. extern BOOL bNetAdmin;
  253. extern BOOL bMinOnRun;
  254. extern BOOL bReplace;
  255. extern BOOL bStatusBar;
  256. extern BOOL bConfirmDelete;
  257. extern BOOL bConfirmSubDel;
  258. extern BOOL bConfirmReplace;
  259. extern BOOL bConfirmMouse;
  260. extern BOOL bConfirmFormat;
  261. extern BOOL bSaveSettings;
  262. extern BOOL bSearchSubs;
  263. extern BOOL bUserAbort;
  264. extern BOOL bConnect;
  265. extern BOOL bDisconnect;
  266. extern BOOL bFileSysChanging;
  267. extern BOOL fShowSourceBitmaps;
  268. extern BOOL bMultiple;
  269. extern BOOL bFSCTimerSet;
  270. extern BOOL bSaveSettings;
  271. extern CHAR chFirstDrive;
  272. extern CHAR szExtensions[];
  273. extern CHAR szFrameClass[];
  274. extern CHAR szTreeClass[];
  275. extern CHAR szDriveClass[];
  276. extern CHAR szDrivesClass[];
  277. extern CHAR szVolumeClass[];
  278. extern CHAR szTreeChildClass[];
  279. extern CHAR szTreeControlClass[];
  280. extern CHAR szDirClass[];
  281. extern CHAR szSearchClass[];
  282. extern CHAR szSaveSettings[];
  283. extern CHAR szMinOnRun[];
  284. extern CHAR szReplace[];
  285. extern CHAR szLowerCase[];
  286. extern CHAR szStatusBar[];
  287. extern CHAR szCurrentView[];
  288. extern CHAR szCurrentSort[];
  289. extern CHAR szCurrentAttribs[];
  290. extern CHAR szConfirmDelete[];
  291. extern CHAR szConfirmSubDel[];
  292. extern CHAR szConfirmReplace[];
  293. extern CHAR szConfirmMouse[];
  294. extern CHAR szConfirmFormat[];
  295. extern CHAR szTreeKey[];
  296. extern CHAR szDirKeyFormat[];
  297. extern CHAR szWindow[];
  298. extern CHAR szDefPrograms[];
  299. extern CHAR szINIFile[];
  300. extern CHAR szWindows[];
  301. extern CHAR szPrevious[];
  302. extern CHAR szSettings[];
  303. extern CHAR szInternational[];
  304. extern CHAR szStarDotStar[];
  305. extern CHAR szNULL[];
  306. extern CHAR szBlank[];
  307. extern CHAR szEllipses[];
  308. extern CHAR szReservedMarker[];
  309. extern CHAR szNetwork[];
  310. extern CHAR szDirsRead[32];
  311. extern CHAR szCurrentFileSpec[];
  312. extern CHAR szShortDate[];
  313. extern CHAR szTime[];
  314. extern CHAR sz1159[];
  315. extern CHAR sz2359[];
  316. extern CHAR szComma[2];
  317. extern CHAR szDated[];
  318. extern CHAR szListbox[];
  319. extern CHAR szWith[];
  320. extern CHAR szTheINIFile[64+12+3];
  321. extern CHAR szTitle[128];
  322. extern CHAR szMessage[MAXMESSAGELEN+1];
  323. extern CHAR szSearch[MAXPATHLEN+1];
  324. extern CHAR szStatusTree[80];
  325. extern CHAR szStatusDir[80];
  326. extern CHAR szOriginalDirPath[64+12+3];
  327. extern CHAR szFace[];
  328. extern CHAR szSize[];
  329. extern CHAR szAddons[];
  330. extern CHAR szUndelete[];
  331. extern CHAR szWinObjHelp[];
  332. extern CHAR szSaveSettings[];
  333. extern CHAR szBytes[10];
  334. extern CHAR szSBytes[10];
  335. extern INT cKids;
  336. extern INT cDrives;
  337. extern INT dxDrive;
  338. extern INT dyDrive;
  339. extern INT dxDriveBitmap;
  340. extern INT dyDriveBitmap;
  341. extern INT dxEllipses;
  342. extern INT dxBraces;
  343. extern INT dxFolder;
  344. extern INT dyFolder;
  345. extern INT dyBorder; /* System Border Width/Height */
  346. extern INT dyBorderx2; /* System Border Width/Height * 2 */
  347. extern INT dyStatus; /* Status Bar height */
  348. extern INT dxStatusField;
  349. extern INT dxText; /* System Font Width 'M' */
  350. extern INT dyText; /* System Font Height */
  351. extern INT dxFileName;
  352. extern INT dyFileName;
  353. extern INT dxFileDetails;
  354. extern INT iFormatDrive; /* Logical # of the drive to format */
  355. extern INT iCurrentDrive; /* Logical # of the drive to format */
  356. extern INT nFloppies; /* Number of Removable Drives */
  357. extern INT rgiDrive[26];
  358. extern INT rgiDriveType[26];
  359. extern VOLINFO *(apVolInfo[26]);
  360. extern INT rgiInt13Drive[26];
  361. extern INT rgiDrivesOffset[26];
  362. extern INT idViewChecked;
  363. extern INT idSortChecked;
  364. extern INT defTabStops[];
  365. extern INT iSelHilite;
  366. extern INT iTime;
  367. extern INT iTLZero;
  368. extern INT cDisableFSC;
  369. extern INT iReadLevel;
  370. extern INT dxFrame;
  371. extern INT dyTitle;
  372. extern INT dxClickRect;
  373. extern INT dyClickRect;
  374. extern HANDLE hAccel;
  375. extern HANDLE hAppInstance;
  376. extern HBITMAP hbmBitmaps;
  377. extern HDC hdcMem;
  378. extern INT iCurDrag;
  379. extern HICON hicoTree;
  380. extern HICON hicoTreeDir;
  381. extern HICON hicoDir;
  382. extern HWND hdlgProgress;
  383. extern HWND hwndFrame;
  384. extern HWND hwndLastActiveDir;
  385. extern HWND hwndMDIClient;
  386. extern HWND hwndSearch;
  387. extern HWND hwndDragging; /* source window of DM */
  388. extern LPSTR szPrograms;
  389. extern LPSTR szDocuments;
  390. extern WORD wTextAttribs;
  391. extern WORD wSuperDlgMode;
  392. extern WORD wCDROMIndex;
  393. extern WORD wDOSversion;
  394. extern UINT wHelpMessage;
  395. extern UINT wBrowseMessage;
  396. extern WORD wNewView;
  397. extern WORD wNewSort;
  398. extern DWORD dwNewAttribs;
  399. extern WORD xTreeMax;
  400. extern LONG lFreeSpace;
  401. extern LONG lTotalSpace;
  402. extern BOOL bPaintBackground;
  403. extern BOOL bCancelTree;
  404. extern HFONT hFont;
  405. extern HFONT hFontStatus;
  406. extern EXTENSION extensions[MAX_EXTENSIONS];
  407. extern INT iDeltaStart;
  408. extern INT iNumExtensions;
  409. extern DWORD ( APIENTRY *lpfpUndelete)(HWND, LPSTR);
  410. extern HHOOK hhkMessageFilter;
  411. extern DWORD dwContext;
  412. extern HANDLE hModUndelete;
  413. extern WORD fFormatFlags;
  414. extern WORD nLastDriveInd;
  415. #endif // ndef NO_WF_GLOBALS
  416. /*--------------------------------------------------------------------------*/
  417. /* */
  418. /* Defines */
  419. /* */
  420. /*--------------------------------------------------------------------------*/
  421. #define TABCHAR '\t'
  422. #define DO_LISTOFFILES 1L
  423. #define WS_MDISTYLE (WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION | WS_THICKFRAME | WS_MAXIMIZEBOX)
  424. #define WS_DIRSTYLE (WS_CHILD | LBS_SORT | LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_EXTENDEDSEL | LBS_NOINTEGRALHEIGHT | LBS_WANTKEYBOARDINPUT)
  425. #define WS_SEARCHSTYLE (WS_DIRSTYLE | LBS_HASSTRINGS | WS_VSCROLL)
  426. /* Extra Window Word Offsets */
  427. // szTreeClass & szSearchClass common..
  428. #define GWL_TYPE 0 // > 0 Tree, -1 = search
  429. #define GWL_VIEW 4
  430. #define GWL_SORT 8
  431. #define GWL_ATTRIBS 12
  432. #define GWL_FSCFLAG 16
  433. // szTreeClass only...
  434. #define GWLP_LASTFOCUS 20
  435. #define GWL_SPLIT 24
  436. // szSearchClass only...
  437. #define GWLP_HDTASEARCH 20
  438. #define GWLP_TABARRAYSEARCH 24 // on szSearchClass
  439. #define GWLP_LASTFOCUSSEARCH 28 // on szSearchClass
  440. // szDirClass...
  441. #define GWLP_HDTA 0
  442. #define GWLP_TABARRAY 4
  443. // szDrivesClass...
  444. #define GWL_CURDRIVEIND 0 // current selection in drives window
  445. #define GWL_CURDRIVEFOCUS 4 // current focus in drives window
  446. #define GWLP_LPSTRVOLUME 8 // LPSTR to Volume/Share string
  447. // szTreeControlClass
  448. #define GWL_READLEVEL 0 // iReadLevel for each tree control window
  449. // GWL_TYPE numbers
  450. #define TYPE_TREE 0 // and all positive numbers (drive number)
  451. #define TYPE_SEARCH -1
  452. /* WM_FILESYSCHANGE message wParam value */
  453. #define FSC_CREATE 0
  454. #define FSC_DELETE 1
  455. #define FSC_RENAME 2
  456. #define FSC_ATTRIBUTES 3
  457. #define FSC_NETCONNECT 4
  458. #define FSC_NETDISCONNECT 5
  459. #define FSC_REFRESH 6
  460. #define FSC_MKDIR 7
  461. #define FSC_RMDIR 8
  462. #define WM_LBTRACKPT 0x131
  463. #define TC_SETDRIVE 0x944
  464. #define TC_GETCURDIR 0x945
  465. #define TC_EXPANDLEVEL 0x946
  466. #define TC_COLLAPSELEVEL 0x947
  467. #define TC_GETDIR 0x948
  468. #define TC_SETDIRECTORY 0x949
  469. #define TC_TOGGLELEVEL 0x950
  470. #define FS_CHANGEDISPLAY (WM_USER+0x100)
  471. #define FS_CHANGEDRIVES (WM_USER+0x101)
  472. #define FS_GETSELECTION (WM_USER+0x102)
  473. #define FS_GETDIRECTORY (WM_USER+0x103)
  474. #define FS_GETDRIVE (WM_USER+0x104)
  475. #define WM_OWNERDRAWBEGIN (WM_USER+0x105)
  476. #define WM_OWNERDRAWEND (WM_USER+0x106)
  477. #define FS_SETDRIVE (WM_USER+0x107)
  478. #define FS_GETFILESPEC (WM_USER+0x108)
  479. #define FS_SETSELECTION (WM_USER+0x109)
  480. #define ATTR_READWRITE 0x0000
  481. #define ATTR_READONLY FILE_ATTRIBUTE_READONLY // == 0x0001
  482. #define ATTR_HIDDEN FILE_ATTRIBUTE_HIDDEN // == 0x0002
  483. #define ATTR_SYSTEM FILE_ATTRIBUTE_SYSTEM // == 0x0004
  484. #define ATTR_VOLUME 0x0008
  485. #define ATTR_DIR FILE_ATTRIBUTE_DIRECTORY // == 0x0010
  486. #define ATTR_ARCHIVE FILE_ATTRIBUTE_ARCHIVE // == 0x0020
  487. #define ATTR_NORMAL FILE_ATTRIBUTE_NORMAL // == 0x0080
  488. #define ATTR_PARENT 0x0040 // my hack DTA bits
  489. #define ATTR_LFN 0x1000 // my hack DTA bits
  490. #define ATTR_RWA (ATTR_READWRITE | ATTR_ARCHIVE)
  491. #define ATTR_ALL (ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_DIR | ATTR_ARCHIVE | ATTR_NORMAL)
  492. #define ATTR_PROGRAMS 0x0100
  493. #define ATTR_DOCS 0x0200
  494. #define ATTR_OTHER 0x0400
  495. #define ATTR_EVERYTHING (ATTR_ALL | ATTR_PROGRAMS | ATTR_DOCS | ATTR_OTHER | ATTR_PARENT)
  496. #define ATTR_DEFAULT (ATTR_EVERYTHING & ~(ATTR_HIDDEN | ATTR_SYSTEM))
  497. #define ATTR_HS (ATTR_HIDDEN | ATTR_SYSTEM)
  498. #define ATTR_TYPES 0x00ff0000
  499. #define ATTR_SYMLINK 0x00010000
  500. #define ATTR_ADAPTER 0x00020000
  501. #define ATTR_CONTROLLER 0x00030000
  502. #define ATTR_DEVICE 0x00040000
  503. #define ATTR_DRIVER 0x00050000
  504. #define ATTR_EVENT 0x00060000
  505. #define ATTR_EVENTPAIR 0x00070000
  506. #define ATTR_FILE 0x00080000
  507. #define ATTR_MUTANT 0x00090000
  508. #define ATTR_PORT 0x000a0000
  509. #define ATTR_PROFILE 0x000b0000
  510. #define ATTR_SECTION 0x000c0000
  511. #define ATTR_SEMAPHORE 0x000d0000
  512. #define ATTR_TIMER 0x000e0000
  513. #define ATTR_TYPE 0x000f0000
  514. #define ATTR_PROCESS 0x00100000
  515. #define ATTR_USED (0x00BF | ATTR_TYPES)
  516. #define ATTR_RETURNED 0x2000 /* used in DTA's by copy */
  517. #define CD_PATH 0x0001
  518. #define CD_VIEW 0x0002
  519. #define CD_SORT 0x0003
  520. #define CD_PATH_FORCE 0x0004
  521. #define CD_SEARCHUPDATE 0x0005
  522. #define CD_ALLOWABORT 0x8000
  523. #define VIEW_NAMEONLY 0x0000
  524. #define VIEW_UPPERCASE 0x0001
  525. #define VIEW_SIZE 0x0002
  526. #define VIEW_DATE 0x0004
  527. #define VIEW_TIME 0x0008
  528. #define VIEW_FLAGS 0x0010
  529. #define VIEW_PLUSES 0x0020
  530. #define VIEW_EVERYTHING (VIEW_SIZE | VIEW_TIME | VIEW_DATE | VIEW_FLAGS)
  531. #define CBSECTORSIZE 512
  532. #define INT13_READ 2
  533. #define INT13_WRITE 3
  534. #define ERR_USER 0xF000
  535. /* Child Window IDs */
  536. #define IDCW_DRIVES 1
  537. #define IDCW_DIR 2
  538. #define IDCW_TREELISTBOX 3
  539. #define IDCW_TREECONTROL 5
  540. #define IDCW_LISTBOX 6 // list in search
  541. #define HasDirWindow(hwnd) GetDlgItem(hwnd, IDCW_DIR)
  542. #define HasTreeWindow(hwnd) GetDlgItem(hwnd, IDCW_TREECONTROL)
  543. #define HasDrivesWindow(hwnd) GetDlgItem(hwnd, IDCW_DRIVES)
  544. #define GetSplit(hwnd) ((int)GetWindowLong(hwnd, GWL_SPLIT))
  545. /* Menu Command Defines */
  546. #define IDM_FILE 0
  547. #define IDM_OPEN 101
  548. #define IDM_PRINT 102
  549. #define IDM_ASSOCIATE 103
  550. #define IDM_SEARCH 104
  551. #define IDM_RUN 105
  552. #define IDM_MOVE 106
  553. #define IDM_COPY 107
  554. #define IDM_DELETE 108
  555. #define IDM_RENAME 109
  556. #define IDM_ATTRIBS 110
  557. #define IDM_MAKEDIR 111
  558. #define IDM_SELALL 112
  559. #define IDM_DESELALL 113
  560. #define IDM_UNDO 114
  561. #define IDM_EXIT 115
  562. #define IDM_SELECT 116
  563. #define IDM_UNDELETE 117
  564. #define IDM_DISK 7
  565. #define IDM_DISKCOPY 801
  566. #define IDM_LABEL 802
  567. #define IDM_FORMAT 803
  568. #define IDM_SYSDISK 804
  569. #define IDM_CONNECT 805
  570. #define IDM_DISCONNECT 806
  571. #define IDM_DRIVESMORE 851
  572. #define IDM_CONNECTIONS 852
  573. #define IDM_TREE 1
  574. #define IDM_EXPONE 201
  575. #define IDM_EXPSUB 202
  576. #define IDM_EXPALL 203
  577. #define IDM_COLLAPSE 204
  578. #define IDM_NEWTREE 205
  579. #define IDM_VIEW 2
  580. #define IDM_VNAME 301
  581. #define IDM_VDETAILS 302
  582. #define IDM_VOTHER 303
  583. #define IDM_BYNAME 304
  584. #define IDM_BYTYPE 305
  585. #define IDM_BYSIZE 306
  586. #define IDM_BYDATE 307
  587. #define IDM_VINCLUDE 309
  588. #define IDM_REPLACE 310
  589. #define IDM_TREEONLY 311
  590. #define IDM_DIRONLY 312
  591. #define IDM_BOTH 313
  592. #define IDM_SPLIT 314
  593. #define IDM_OPTIONS 3
  594. #define IDM_CONFIRM 401
  595. #define IDM_LOWERCASE 402
  596. #define IDM_STATUSBAR 403
  597. #define IDM_MINONRUN 404
  598. #define IDM_ADDPLUSES 405
  599. #define IDM_EXPANDTREE 406
  600. #define IDM_FONT 410
  601. #define IDM_SAVESETTINGS 411
  602. #define IDM_EXTENSIONS 5
  603. #define IDM_WINDOW 10 // IDM_EXTENSIONS + MAX_EXTENSIONS
  604. #define IDM_CASCADE 1001
  605. #define IDM_TILE 1002
  606. #define IDM_REFRESH 1003
  607. #define IDM_ARRANGE 1004
  608. #define IDM_NEWWINDOW 1005
  609. #define IDM_CHILDSTART 1006
  610. #define IDM_HELP 11 // IDM_WINDOW + 1
  611. #define IDM_HELPINDEX 1101
  612. #define IDM_HELPKEYS 0x001E
  613. #define IDM_HELPCOMMANDS 0x0020
  614. #define IDM_HELPPROCS 0x0021
  615. #define IDM_HELPHELP 1102
  616. #define IDM_ABOUT 1103
  617. #define BITMAPS 100
  618. #define FILES_WIDTH 16
  619. #define FILES_HEIGHT 16
  620. #define DRIVES_WIDTH 27
  621. #define DRIVES_HEIGHT 14
  622. #define APPICON 200
  623. #define TREEICON 201
  624. #define DIRICON 202
  625. #define WINDOWSICON 203
  626. #define TREEDIRICON 204
  627. #define SINGLEMOVECURSOR 300 // move is even
  628. #define MULTMOVECURSOR 302
  629. #define SINGLECOPYCURSOR 301 // copy is odd
  630. #define MULTCOPYCURSOR 303
  631. #define APPCURSOR 300
  632. #define DIRCURSOR 301
  633. #define DOCCURSOR 302
  634. #define FILECURSOR 304
  635. #define FILESCURSOR 305
  636. #define SPLITCURSOR 306
  637. #define APPCURSORC 310
  638. #define DIRCURSORC 311
  639. #define DOCCURSORC 312
  640. #define FILECURSORC 314
  641. #define FILESCURSORC 315
  642. #define WFACCELTABLE 400
  643. #define FRAMEMENU 500
  644. /* Indexes into the mondo bitmap */
  645. #define BM_IND_APP 0
  646. #define BM_IND_DOC 1
  647. #define BM_IND_FIL 2
  648. #define BM_IND_RO 3
  649. #define BM_IND_DIRUP 4
  650. #define BM_IND_CLOSE 5
  651. #define BM_IND_CLOSEPLUS 6
  652. #define BM_IND_OPEN 7
  653. #define BM_IND_OPENPLUS 8
  654. #define BM_IND_OPENMINUS 9
  655. #define BM_IND_CLOSEMINUS 10
  656. #define BM_IND_CLOSEDFS 11
  657. #define BM_IND_OPENDFS 12
  658. #define BM_IND_TYPEBASE 13
  659. #define IDS_ENDSESSION 40 /* Must be > 32 */
  660. #define IDS_ENDSESSIONMSG 41
  661. #define IDS_COPYDISK 50
  662. #define IDS_INSERTDEST 51
  663. #define IDS_INSERTSRC 52
  664. #define IDS_INSERTSRCDEST 53
  665. #define IDS_FORMATTINGDEST 54
  666. #define IDS_COPYDISKERR 55
  667. #define IDS_COPYDISKERRMSG 56
  668. #define IDS_COPYDISKSELMSG 57
  669. #define IDS_COPYSRCDESTINCOMPAT 58
  670. #define IDS_PERCENTCOMP 60
  671. #define IDS_CREATEROOT 61
  672. #define IDS_COPYSYSFILES 62
  673. #define IDS_FORMATERR 63
  674. #define IDS_FORMATERRMSG 64
  675. //#define IDS_FORMATCURERR 65
  676. #define IDS_FORMATCOMPLETE 66
  677. #define IDS_FORMATANOTHER 67
  678. #define IDS_FORMATCANCELLED 68
  679. #define IDS_SYSDISK 70
  680. #define IDS_SYSDISKRUSURE 71
  681. #define IDS_SYSDISKERR 72
  682. #define IDS_SYSDISKNOFILES 73
  683. #define IDS_SYSDISKSAMEDRIVE 74
  684. #define IDS_SYSDISKADDERR 75
  685. #define IDS_NETERR 80
  686. #define IDS_NETCONERRMSG 81
  687. #define IDS_NETDISCONCURERR 82
  688. #define IDS_NETDISCONWINERR 83
  689. #define IDS_NETDISCON 84
  690. #define IDS_NETDISCONRUSURE 85
  691. #define IDS_NETDISCONERRMSG 86
  692. #define IDS_FILESYSERR 90
  693. #define IDS_ATTRIBERR 91
  694. #define IDS_MAKEDIRERR 92
  695. #define IDS_LABELDISKERR 93
  696. #define IDS_SEARCHERR 94
  697. #define IDS_SEARCHNOMATCHES 95
  698. #define IDS_MAKEDIREXISTS 96
  699. #define IDS_SEARCHREFRESH 97
  700. #define IDS_ASSOCFILE 100
  701. #define IDS_DRIVETEMP 101
  702. #define IDS_EXECERRTITLE 110
  703. #define IDS_UNKNOWNMSG 111
  704. #define IDS_NOMEMORYMSG 112
  705. #define IDS_FILENOTFOUNDMSG 113
  706. #define IDS_BADPATHMSG 114
  707. #define IDS_MANYOPENFILESMSG 115
  708. #define IDS_NOASSOCMSG 116
  709. #define IDS_MULTIPLEDSMSG 117
  710. #define IDS_ASSOCINCOMPLETE 118
  711. #define IDS_MOUSECONFIRM 120
  712. #define IDS_COPYMOUSECONFIRM 121
  713. #define IDS_MOVEMOUSECONFIRM 122
  714. #define IDS_EXECMOUSECONFIRM 123
  715. #define IDS_WINFILE 124
  716. #define IDS_ONLYONE 125
  717. #define IDS_TREETITLE 126
  718. #define IDS_SEARCHTITLE 127
  719. #define IDS_NOFILESTITLE 130
  720. #define IDS_NOFILESMSG 131
  721. #define IDS_TOOMANYTITLE 132
  722. #define IDS_OOMTITLE 133
  723. #define IDS_OOMREADINGDIRMSG 134
  724. #define IDS_CURDIRIS 140
  725. #define IDS_COPY 141
  726. #define IDS_ANDCOPY 142
  727. #define IDS_RENAME 143
  728. #define IDS_ANDRENAME 144
  729. #define IDS_FORMAT 145
  730. #define IDS_FORMATSELDISK 146
  731. //#define IDS_MAKESYSDISK 147
  732. #define IDS_DISCONNECT 148
  733. #define IDS_DISCONSELDISK 149
  734. #define IDS_CREATINGMSG 150
  735. #define IDS_REMOVINGMSG 151
  736. #define IDS_COPYINGMSG 152
  737. #define IDS_RENAMINGMSG 153
  738. #define IDS_MOVINGMSG 154
  739. #define IDS_DELETINGMSG 155
  740. #define IDS_PRINTINGMSG 156
  741. #define IDS_NOSUCHDRIVE 160
  742. #define IDS_MOVEREADONLY 161
  743. #define IDS_RENAMEREADONLY 162
  744. #define IDS_CONFIRMREPLACE 163
  745. #define IDS_CONFIRMREPLACERO 164 /* Confirm/readonly */
  746. #define IDS_CONFIRMRMDIR 165 /* Must be confirm + 1 */
  747. #define IDS_CONFIRMRMDIRRO 166
  748. #define IDS_CONFIRMDELETE 167
  749. #define IDS_CONFIRMDELETERO 168
  750. #define IDS_COPYINGTITLE 169
  751. #define IDS_REMOVINGDIRMSG 170
  752. #define IDS_STATUSMSG 180
  753. #define IDS_DIRSREAD 181
  754. #define IDS_DRIVEFREE 182
  755. #define IDS_SEARCHMSG 183
  756. #define IDS_DRIVE 184
  757. #define IDS_SELECTEDFILES 185
  758. #define IDS_NETDISCONOPEN 186
  759. #define IDS_STATUSMSG2 187
  760. #define IDS_DRIVENOTREADY 188
  761. #define IDS_UNFORMATTED 189
  762. #define IDS_CANTPRINTTITLE 190
  763. #define IDS_PRINTFNF 191
  764. #define IDS_PRINTDISK 192
  765. #define IDS_PRINTMEMORY 193
  766. #define IDS_PRINTERROR 194
  767. #define IDS_TREEABORT 195
  768. #define IDS_TREEABORTTITLE 196
  769. #define IDS_DESTFULL 197
  770. #define IDS_WRITEPROTECTFILE 198
  771. #define IDS_FORMATQUICKFAILURE 199
  772. #define IDS_OS2APPMSG 200
  773. #define IDS_NEWWINDOWSMSG 201
  774. #define IDS_PMODEONLYMSG 202
  775. #define IDS_DDEFAIL 203
  776. #define IDS_FORMATCONFIRM 210
  777. #define IDS_FORMATCONFIRMTITLE 211
  778. #define IDS_DISKCOPYCONFIRM 212
  779. #define IDS_DISKCOPYCONFIRMTITLE 213
  780. #define IDS_CLOSE 214
  781. #define IDS_UNDELETE 215
  782. #define IDS_CONNECT 216
  783. #define IDS_CONNECTIONS 217
  784. #define IDS_PATHNOTTHERE 218
  785. #define IDS_PROGRAMS 219
  786. #define IDS_ASSOCIATE 220
  787. #define IDS_RUN 221
  788. #define IDS_PRINTERRTITLE 222
  789. #define IDS_WINHELPERR 223
  790. #define IDS_NOEXEASSOC 224
  791. #define IDS_ASSOCNOTEXE 225
  792. #define IDS_ASSOCNONE 226
  793. #define IDS_NOFILES 227
  794. #define IDS_PRINTONLYONE 228
  795. #define IDS_COMPRESSEDEXE 229
  796. #define IDS_INVALIDDLL 230
  797. #define IDS_SHAREERROR 231
  798. #define IDS_CREATELONGDIR 232
  799. #define IDS_CREATELONGDIRTITLE 233
  800. #define IDS_BYTES 234
  801. #define IDS_SBYTES 235
  802. #define IDS_DRIVEBASE 300
  803. #define IDS_12MB (300 + DS96)
  804. #define IDS_360KB (300 + DS48)
  805. #define IDS_144MB (300 + DS144M)
  806. #define IDS_720KB (300 + DS720KB)
  807. #define IDS_288MB (300 + DS288M)
  808. #define IDS_DEVICECAP (300 + DS288M + 1)
  809. #define IDS_FFERR_MEM 400
  810. #define IDS_FFERR_USERABORT 401
  811. #define IDS_FFERR_SRCEQDST 402
  812. #define IDS_FFERR_SECSIZE 403
  813. #define IDS_FFERR_DRIVETYPE 404
  814. //#define IDS_FFERR_BADTRACK 405
  815. //#define IDS_FFERR_WRITEBOOT 406
  816. //#define IDS_FFERR_WRITEFAT 407
  817. //#define IDS_FFERR_WRITEROOT 408
  818. #define IDS_FFERR_SYSFILES 409
  819. #define IDS_FFERR_MEDIASENSE 410
  820. #define IDS_FFERR 411
  821. #define IDS_OPENINGMSG 420
  822. #define IDS_CLOSINGMSG 421
  823. #define IDS_COPYERROR 1000
  824. #define IDS_VERBS 1010
  825. #define IDS_ACTIONS 1020
  826. #define IDS_REPLACING 1030
  827. #define IDS_CREATING 1031
  828. #define IDS_REASONS 1040 // error codes strings (range += 255)
  829. #define DE_INVFUNCTION 0x01 // DOS error codes (int21 returns)
  830. #define DE_FILENOTFOUND 0x02
  831. #define DE_PATHNOTFOUND 0x03
  832. #define DE_NOHANDLES 0x04
  833. #define DE_ACCESSDENIED 0x05
  834. #define DE_INVHANDLE 0x06
  835. #define DE_INSMEM 0x08
  836. #define DE_INVFILEACCESS 0x0C
  837. #define DE_DELCURDIR 0x10
  838. #define DE_NOTSAMEDEVICE 0x11
  839. #define DE_NODIRENTRY 0x12
  840. #define DE_WRITEPROTECTED 0x13 // extended error start here
  841. #define DE_ACCESSDENIEDNET 0x41
  842. #define DE_NODISKSPACE 0x70 // our own error codes
  843. #define DE_SAMEFILE 0x71
  844. #define DE_MANYSRC1DEST 0x72
  845. #define DE_DIFFDIR 0x73
  846. #define DE_ROOTDIR 0x74
  847. #define DE_OPCANCELLED 0x75
  848. #define DE_DESTSUBTREE 0x76
  849. #define DE_WINDOWSFILE 0x77
  850. #define DE_ACCESSDENIEDSRC 0x78
  851. #define DE_PATHTODEEP 0x79
  852. #define DE_MANYDEST 0x7A
  853. #define DE_RENAMREPLACE 0x7B
  854. #define DE_HOWDIDTHISHAPPEN 0xFF // internal error
  855. #define ERRORONDEST 0x80 // indicate error on destination file
  856. #include "wfdlgs.h"
  857. // struct for save and restore of window positions
  858. typedef struct {
  859. CHAR szDir[MAXPATHLEN];
  860. RECT rc;
  861. POINT pt;
  862. INT sw;
  863. INT view;
  864. INT sort;
  865. INT attribs;
  866. INT split;
  867. } SAVE_WINDOW, NEAR *PSAVE_WINDOW;
  868. #define SC_SPLIT 100
  869. // Temporary. copied from win31 windows.h and slightly modified.
  870. // We can delete these definitions once USER incorporates these in winuser.h
  871. #define GlobalAllocPtr(flags, cb) \
  872. (GlobalLock(GlobalAlloc((flags), (cb))))
  873. #define GlobalFreePtr(lp) \
  874. (GlobalUnlock(lp), (BOOL)(ULONG_PTR)GlobalFree((lp)))
  875. WORD APIENTRY WFRemove(PSTR pszFile);
  876. WORD APIENTRY WFMove(PSTR pszFrom, PSTR pszTo);
  877. // These errors aren't in shellapi.h as yet. till such time...
  878. /* error values for ShellExecute() beyond the regular WinExec() codes */
  879. #define SE_ERR_SHARE 26
  880. #define SE_ERR_ASSOCINCOMPLETE 27
  881. #define SE_ERR_DDETIMEOUT 28
  882. #define SE_ERR_DDEFAIL 29
  883. #define SE_ERR_DDEBUSY 30
  884. #define SE_ERR_NOASSOC 31
  885. // the LPDROPSTRUCT->dwData will point to this structure
  886. typedef struct { /* dodata */
  887. LPSTR pch; // in win31 this is LOWORD(lpds->dwData)
  888. HANDLE hMemGlobal; // in win31 this is HIWORD(lpds->dwData)
  889. } DRAGOBJECTDATA, FAR *LPDRAGOBJECTDATA;
  890. #include "dlg.h"