[36] | 1 |
|
---|
| 2 | /***********************************************************************
|
---|
| 3 |
|
---|
| 4 | $Id: info.c 1480 2009-11-22 22:58:49Z gyoung $
|
---|
| 5 |
|
---|
[576] | 6 | Info windows
|
---|
[36] | 7 |
|
---|
| 8 | Copyright (c) 1993-98 M. Kimes
|
---|
[907] | 9 | Copyright (c) 2001, 2008 Steven H. Levine
|
---|
[36] | 10 |
|
---|
[131] | 11 | 16 Oct 02 SHL Handle large partitions
|
---|
| 12 | 12 Feb 03 SHL FileInfoProc: standardize EA math
|
---|
| 13 | 01 Aug 04 SHL Rework lstrip/rstrip usage
|
---|
[130] | 14 | 23 May 05 SHL Use QWL_USER
|
---|
[162] | 15 | 25 May 05 SHL Use ULONGLONG and CommaFmtULL
|
---|
[186] | 16 | 05 Jun 05 SHL Use QWL_USER
|
---|
[336] | 17 | 14 Jul 06 SHL Use Runtime_Error
|
---|
[575] | 18 | 24 Mar 07 SHL Correct FileInfoProc binary file detect
|
---|
| 19 | 24 Mar 07 SHL Correct FileInfoProc/IconProc race crash
|
---|
[618] | 20 | 19 Apr 07 SHL Sync with AcceptOneDrop GetOneDrop mods
|
---|
[793] | 21 | 20 Aug 07 GKY Move #pragma alloc_text to end for OpenWatcom compat
|
---|
[805] | 22 | 25 Aug 07 SHL Drop list from FILESTUF - data not static
|
---|
| 23 | 25 Aug 07 SHL IconProc: do not use freed memory - random bad things happen
|
---|
[846] | 24 | 27 Sep 07 SHL Correct ULONGLONG size formatting
|
---|
[897] | 25 | 30 Dec 07 GKY Use CommaFmtULL
|
---|
[985] | 26 | 29 Feb 08 GKY Use xfree where appropriate
|
---|
[1358] | 27 | 25 Dec 08 GKY Add code to allow write verify to be turned off on a per drive basis
|
---|
| 28 | 25 Dec 08 GKY Add DRIVE_RSCANNED flag to monitor for the first recursive drive scan per session
|
---|
| 29 | to prevent duplicate directory names in tree following a copy before initial scan.
|
---|
[1391] | 30 | 11 Jan 08 GKY Add Write verify off and recures scan to drive info display when appropriate.
|
---|
[1395] | 31 | 07 Feb 09 GKY Allow user to turn off alert and/or error beeps in settings notebook.
|
---|
| 32 | 07 Feb 09 GKY Add *DateFormat functions to format dates based on locale
|
---|
[1400] | 33 | 08 Mar 09 GKY Renamed commafmt.h i18nutil.h
|
---|
[1439] | 34 | 12 Jul 09 GKY Remove code to update recursive scan setting which isn't user setable
|
---|
[1444] | 35 | 22 Jul 09 GKY Check if drives support EAs add driveflag for this
|
---|
| 36 | 22 Jul 09 GKY Add LocalHD driveflag
|
---|
[36] | 37 |
|
---|
| 38 | ***********************************************************************/
|
---|
| 39 |
|
---|
[907] | 40 | #include <stdlib.h>
|
---|
| 41 | #include <string.h>
|
---|
| 42 | #include <ctype.h>
|
---|
| 43 | #include <share.h>
|
---|
| 44 |
|
---|
[2] | 45 | #define INCL_DOS
|
---|
| 46 | #define INCL_WIN
|
---|
| 47 | #define INCL_GPI
|
---|
[162] | 48 | #define INCL_LONGLONG
|
---|
[2] | 49 |
|
---|
[1183] | 50 | #include "fm3dll.h"
|
---|
[1223] | 51 | #include "fm3dll2.h" // #define's for UM_*, control id's, etc.
|
---|
[1208] | 52 | #include "draglist.h" // Data declaration(s)
|
---|
| 53 | #include "notebook.h" // Data declaration(s)
|
---|
| 54 | #include "inis.h" // Data declaration(s)
|
---|
| 55 | #include "init.h" // Data declaration(s)
|
---|
| 56 | #include "mainwnd.h" // Data declaration(s)
|
---|
[2] | 57 | #include "fm3dlg.h"
|
---|
| 58 | #include "fm3str.h"
|
---|
[907] | 59 | #include "makelist.h" // AddToList
|
---|
| 60 | #include "errutil.h" // Dos_Error...
|
---|
| 61 | #include "strutil.h" // GetPString
|
---|
[1160] | 62 | #include "attribs.h" // AttrListDlgProc
|
---|
| 63 | #include "defview.h" // DefaultView
|
---|
| 64 | #include "info.h"
|
---|
[1183] | 65 | #include "valid.h" // CheckDrive, IsBinary
|
---|
[1160] | 66 | #include "seticon.h" // SetIconDlgProc
|
---|
[1183] | 67 | #include "droplist.h" // AcceptOneDrop, DropHelp, GetOneDrop
|
---|
| 68 | #include "eas.h" // DisplayEAsProc
|
---|
| 69 | #include "misc.h" // DrawTargetEmphasis
|
---|
| 70 | #include "notify.h" // Notify
|
---|
| 71 | #include "shadow.h" // OpenObject
|
---|
| 72 | #include "chklist.h" // PopupMenu
|
---|
| 73 | #include "presparm.h" // SetPresParams
|
---|
| 74 | #include "strips.h" // bstrip
|
---|
[1400] | 75 | #include "i18nutil.h" // CommaFmtULL
|
---|
[1183] | 76 | #include "wrappers.h" // xDosFindFirst
|
---|
[1039] | 77 | #include "fortify.h"
|
---|
[2] | 78 |
|
---|
[1208] | 79 | // Data definitions
|
---|
[2] | 80 | #pragma data_seg(DATA1)
|
---|
[336] | 81 | static PSZ pszSrcFile = __FILE__;
|
---|
| 82 |
|
---|
[1208] | 83 | #pragma data_seg(GLOBAL1)
|
---|
| 84 | INT driveflags[26];
|
---|
| 85 |
|
---|
[551] | 86 | CHAR *FlagMsg(CHAR drive, CHAR * buffer)
|
---|
[336] | 87 | {
|
---|
[551] | 88 | ULONG x;
|
---|
| 89 | BOOL once = FALSE;
|
---|
| 90 | register CHAR *p;
|
---|
[2] | 91 |
|
---|
[551] | 92 | if (buffer) {
|
---|
[2] | 93 | *buffer = 0;
|
---|
| 94 | p = buffer;
|
---|
[551] | 95 | if (isalpha(drive)) {
|
---|
| 96 | if (driveflags[toupper(drive) - 'A']) {
|
---|
[1391] | 97 | for (x = IDS_FLREMOVABLETEXT; x < IDS_FLRECURSESCANDONETEXT + 1; x++) {
|
---|
[551] | 98 | if (driveflags[toupper(drive) - 'A'] &
|
---|
| 99 | (1 << (x - IDS_FLREMOVABLETEXT))) {
|
---|
| 100 | if (once) {
|
---|
| 101 | *p = ' ';
|
---|
| 102 | p++;
|
---|
| 103 | }
|
---|
| 104 | else
|
---|
| 105 | once = TRUE;
|
---|
| 106 | *p = '[';
|
---|
| 107 | p++;
|
---|
| 108 | strcpy(p, GetPString(x));
|
---|
| 109 | p += strlen(p);
|
---|
| 110 | *p = ']';
|
---|
| 111 | p++;
|
---|
| 112 | *p = 0;
|
---|
| 113 | }
|
---|
| 114 | }
|
---|
[2] | 115 | }
|
---|
| 116 | else
|
---|
[551] | 117 | strcpy(buffer, "[None]");
|
---|
[2] | 118 | }
|
---|
| 119 | }
|
---|
| 120 | return buffer;
|
---|
| 121 | }
|
---|
| 122 |
|
---|
[551] | 123 | MRESULT EXPENTRY DrvInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[162] | 124 | {
|
---|
| 125 | CHAR *pszFileName;
|
---|
[551] | 126 | CHAR szMB[20];
|
---|
| 127 | CHAR szKB[20];
|
---|
| 128 | CHAR szUnits[20];
|
---|
[336] | 129 | APIRET rc;
|
---|
[2] | 130 |
|
---|
[551] | 131 | switch (msg) {
|
---|
| 132 | case WM_INITDLG:
|
---|
| 133 | if (mp2) {
|
---|
[2] | 134 |
|
---|
[551] | 135 | CHAR s[CCHMAXPATH * 2];
|
---|
| 136 | ULONG type;
|
---|
[2] | 137 |
|
---|
[1009] | 138 | pszFileName = (CHAR *)mp2;
|
---|
[551] | 139 | WinSetWindowPtr(hwnd, QWL_USER, (PVOID) pszFileName);
|
---|
| 140 | WinSendDlgItemMsg(hwnd,
|
---|
| 141 | INFO_LABEL,
|
---|
| 142 | EM_SETTEXTLIMIT,
|
---|
| 143 | MPFROM2SHORT(CCHMAXPATHCOMP, 0), MPVOID);
|
---|
[552] | 144 | if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOSTATS)){
|
---|
[551] | 145 | WinSendDlgItemMsg(hwnd,
|
---|
| 146 | INFO_FREE,
|
---|
| 147 | SLM_SETSLIDERINFO,
|
---|
| 148 | MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS, 0),
|
---|
| 149 | MPFROM2SHORT(0, 0));
|
---|
| 150 | WinSendDlgItemMsg(hwnd,
|
---|
| 151 | INFO_USED,
|
---|
| 152 | SLM_SETSLIDERINFO,
|
---|
| 153 | MPFROM2SHORT(SMA_SLIDERARMDIMENSIONS, 0),
|
---|
| 154 | MPFROM2SHORT(0, 0));
|
---|
[552] | 155 | }
|
---|
[551] | 156 | if (driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOTWRITEABLE) {
|
---|
| 157 | WinSendDlgItemMsg(hwnd,
|
---|
| 158 | INFO_LABEL,
|
---|
| 159 | EM_SETREADONLY, MPFROM2SHORT(TRUE, 0), MPVOID);
|
---|
| 160 | WinSetFocus(HWND_DESKTOP, WinWindowFromID(hwnd, DID_OK));
|
---|
| 161 | }
|
---|
| 162 | if (IsFullName(pszFileName)) {
|
---|
[2] | 163 |
|
---|
[551] | 164 | CHAR FileSystem[CCHMAXPATH * 2];
|
---|
[2] | 165 |
|
---|
[551] | 166 | sprintf(FileSystem,
|
---|
| 167 | GetPString(IDS_DRIVEINFOTITLETEXT), toupper(*pszFileName));
|
---|
| 168 | WinSetWindowText(hwnd, FileSystem);
|
---|
[575] | 169 | if (CheckDrive(toupper(*pszFileName), FileSystem, &type) != -1){
|
---|
[2] | 170 |
|
---|
[551] | 171 | FSALLOCATE fsa;
|
---|
[2] | 172 |
|
---|
[552] | 173 | if (type & (DRIVE_REMOTE | DRIVE_ZIPSTREAM | DRIVE_VIRTUAL)) {
|
---|
[2] | 174 |
|
---|
[551] | 175 | CHAR Path[3], *pfsn, *pfsd;
|
---|
| 176 | ULONG Size;
|
---|
| 177 | APIRET rc;
|
---|
| 178 | PFSQBUFFER2 pfsq;
|
---|
[2] | 179 |
|
---|
[551] | 180 | Path[0] = toupper(*pszFileName);
|
---|
| 181 | Path[1] = ':';
|
---|
| 182 | Path[2] = 0;
|
---|
| 183 | Size = sizeof(s);
|
---|
| 184 | DosError(FERR_DISABLEHARDERR);
|
---|
| 185 | rc = DosQueryFSAttach(Path,
|
---|
| 186 | 0, FSAIL_QUERYNAME, (PFSQBUFFER2) s, &Size);
|
---|
| 187 | if (!rc) {
|
---|
| 188 | pfsq = (PFSQBUFFER2) s;
|
---|
[689] | 189 | pfsn = (PCHAR)(pfsq->szName) + pfsq->cbName + 1;
|
---|
[551] | 190 | pfsd = pfsn + pfsq->cbFSDName + 1;
|
---|
| 191 | if (pfsq->cbFSAData && pfsd && *pfsd) {
|
---|
| 192 | sprintf(s, " (%s)", pfsd);
|
---|
| 193 | WinSetDlgItemText(hwnd, INFO_REALPATH, s);
|
---|
| 194 | }
|
---|
| 195 | }
|
---|
| 196 | }
|
---|
[2] | 197 |
|
---|
[551] | 198 | DosError(FERR_DISABLEHARDERR);
|
---|
| 199 | if (!DosQueryFSInfo(toupper(*pszFileName) - '@',
|
---|
| 200 | FSIL_ALLOC, &fsa, sizeof(FSALLOCATE))) {
|
---|
[2] | 201 |
|
---|
[551] | 202 | struct
|
---|
| 203 | {
|
---|
| 204 | ULONG serial;
|
---|
| 205 | CHAR volumelength;
|
---|
| 206 | CHAR volumelabel[CCHMAXPATH];
|
---|
| 207 | }
|
---|
| 208 | volser;
|
---|
| 209 | USHORT percentfree, percentused;
|
---|
[2] | 210 |
|
---|
[551] | 211 | memset(&volser, 0, sizeof(volser));
|
---|
| 212 | DosError(FERR_DISABLEHARDERR);
|
---|
| 213 | if (!DosQueryFSInfo(toupper(*pszFileName) - '@',
|
---|
| 214 | FSIL_VOLSER,
|
---|
| 215 | &volser, (ULONG) sizeof(volser))) {
|
---|
| 216 | WinSetDlgItemText(hwnd, INFO_FS, FileSystem);
|
---|
| 217 | WinSetDlgItemText(hwnd, INFO_LABEL, volser.volumelabel);
|
---|
| 218 | sprintf(s, "%lx", volser.serial);
|
---|
[575] | 219 | WinSetDlgItemText(hwnd, INFO_SERIAL, s);
|
---|
| 220 | FlagMsg(*pszFileName, s);
|
---|
[552] | 221 | WinSetDlgItemText(hwnd, INFO_FLAGS, s);
|
---|
[575] | 222 | if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOSTATS)){
|
---|
[551] | 223 | CommaFmtULL(szMB, sizeof(szMB),
|
---|
| 224 | (ULONGLONG) fsa.cUnit *
|
---|
| 225 | (fsa.cSectorUnit * fsa.cbSector), 'M');
|
---|
| 226 | CommaFmtULL(szKB, sizeof(szKB),
|
---|
| 227 | (ULONGLONG) fsa.cUnit *
|
---|
| 228 | (fsa.cSectorUnit * fsa.cbSector), 'K');
|
---|
| 229 | CommaFmtULL(szUnits, sizeof(szUnits),
|
---|
| 230 | (ULONGLONG) fsa.cUnit, ' ');
|
---|
| 231 | sprintf(s, "%s, %s, %s %s%s", szMB, szKB, szUnits, GetPString(IDS_UNITTEXT), &"s"[fsa.cUnit == 1L]); // hack cough
|
---|
| 232 | WinSetDlgItemText(hwnd, INFO_TOTAL, s);
|
---|
[162] | 233 |
|
---|
[551] | 234 | CommaFmtULL(szMB, sizeof(szMB),
|
---|
| 235 | (ULONGLONG) fsa.cUnitAvail *
|
---|
| 236 | (fsa.cSectorUnit * fsa.cbSector), 'M');
|
---|
| 237 | CommaFmtULL(szKB, sizeof(szKB),
|
---|
| 238 | (ULONGLONG) fsa.cUnitAvail *
|
---|
| 239 | (fsa.cSectorUnit * fsa.cbSector), 'K');
|
---|
| 240 | CommaFmtULL(szUnits, sizeof(szUnits),
|
---|
| 241 | (ULONGLONG) fsa.cUnitAvail, ' ');
|
---|
[1402] | 242 | sprintf(s, "%s, %s, %s %s%s",
|
---|
| 243 | szMB, szKB, szUnits,
|
---|
| 244 | GetPString(IDS_UNITTEXT), &"s"[fsa.cUnitAvail == 1L]);
|
---|
[551] | 245 | WinSetDlgItemText(hwnd, INFO_AVAILABLE, s);
|
---|
| 246 | sprintf(s,
|
---|
[1402] | 247 | GetPString(IDS_SECTORSTEXT),
|
---|
| 248 | fsa.cbSector,
|
---|
| 249 | fsa.cSectorUnit, &"s"[fsa.cSectorUnit == 1L]);
|
---|
[551] | 250 | WinSetDlgItemText(hwnd, INFO_ALLOCUNITS, s);
|
---|
[552] | 251 |
|
---|
[551] | 252 | percentfree = (fsa.cUnitAvail && fsa.cUnit) ?
|
---|
| 253 | (fsa.cUnitAvail * 100) / fsa.cUnit : 0;
|
---|
| 254 | if (!percentfree && fsa.cUnitAvail)
|
---|
| 255 | percentfree = 1;
|
---|
| 256 | percentused = 100 - percentfree;
|
---|
| 257 | WinSendDlgItemMsg(hwnd,
|
---|
| 258 | INFO_USED,
|
---|
| 259 | SLM_SETSLIDERINFO,
|
---|
| 260 | MPFROM2SHORT(SMA_SLIDERARMPOSITION,
|
---|
| 261 | SMA_INCREMENTVALUE),
|
---|
| 262 | MPFROMSHORT(percentused));
|
---|
| 263 | WinSendDlgItemMsg(hwnd,
|
---|
| 264 | INFO_FREE,
|
---|
| 265 | SLM_SETSLIDERINFO,
|
---|
| 266 | MPFROM2SHORT(SMA_SLIDERARMPOSITION,
|
---|
| 267 | SMA_INCREMENTVALUE),
|
---|
| 268 | MPFROMSHORT(percentfree));
|
---|
| 269 | sprintf(s, "%u%%", percentused);
|
---|
| 270 | WinSetDlgItemText(hwnd, INFO_USEDPERCENT, s);
|
---|
| 271 | sprintf(s, "%u%%", percentfree);
|
---|
[575] | 272 | WinSetDlgItemText(hwnd, INFO_FREEPERCENT, s);
|
---|
| 273 | }
|
---|
| 274 | else
|
---|
| 275 | WinSetDlgItemText(hwnd, INFO_AVAILABLE, GetPString(IDS_STATSMEANINGLESSTEXT));
|
---|
[551] | 276 | }
|
---|
| 277 | else {
|
---|
| 278 | sprintf(FileSystem,
|
---|
[1402] | 279 | GetPString(IDS_CANTQUERYVOLTEXT),
|
---|
| 280 | toupper(*pszFileName));
|
---|
[551] | 281 | Notify(FileSystem);
|
---|
| 282 | WinDismissDlg(hwnd, 0);
|
---|
| 283 | }
|
---|
| 284 | }
|
---|
| 285 | else {
|
---|
| 286 | sprintf(FileSystem,
|
---|
[1402] | 287 | GetPString(IDS_CANTQUERYALLOCTEXT),
|
---|
| 288 | toupper(*pszFileName));
|
---|
[551] | 289 | Notify(FileSystem);
|
---|
| 290 | WinDismissDlg(hwnd, 0);
|
---|
| 291 | }
|
---|
| 292 | }
|
---|
| 293 | else {
|
---|
| 294 | FlagMsg(*pszFileName, s);
|
---|
| 295 | sprintf(FileSystem,
|
---|
[1402] | 296 | GetPString(IDS_DRIVEINACCESSIBLETEXT),
|
---|
| 297 | toupper(*pszFileName), s);
|
---|
[551] | 298 | Notify(FileSystem);
|
---|
| 299 | WinDismissDlg(hwnd, 0);
|
---|
| 300 | }
|
---|
[2] | 301 | }
|
---|
[551] | 302 | else {
|
---|
| 303 | WinDismissDlg(hwnd, 0);
|
---|
| 304 | }
|
---|
| 305 | }
|
---|
| 306 | else
|
---|
| 307 | WinDismissDlg(hwnd, 0);
|
---|
| 308 | break;
|
---|
[2] | 309 |
|
---|
[551] | 310 | case WM_CONTROL:
|
---|
| 311 | return 0;
|
---|
[2] | 312 |
|
---|
[551] | 313 | case WM_COMMAND:
|
---|
| 314 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 315 | case DID_CANCEL:
|
---|
| 316 | WinDismissDlg(hwnd, 0);
|
---|
| 317 | break;
|
---|
[2] | 318 |
|
---|
[551] | 319 | case IDM_HELP:
|
---|
| 320 | if (hwndHelp)
|
---|
| 321 | WinSendMsg(hwndHelp,
|
---|
| 322 | HM_DISPLAY_HELP,
|
---|
| 323 | MPFROM2SHORT(HELP_DRVINFO, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
| 324 | break;
|
---|
[2] | 325 |
|
---|
[551] | 326 | case DID_OK:
|
---|
| 327 | pszFileName = INSTDATA(hwnd);
|
---|
| 328 | if (!(driveflags[toupper(*pszFileName) - 'A'] & DRIVE_NOTWRITEABLE)) {
|
---|
[2] | 329 |
|
---|
[551] | 330 | CHAR s[CCHMAXPATHCOMP + 3];
|
---|
[2] | 331 |
|
---|
[551] | 332 | *s = 0;
|
---|
| 333 | WinQueryDlgItemText(hwnd, INFO_LABEL, CCHMAXPATHCOMP, s);
|
---|
| 334 | bstrip(s);
|
---|
| 335 | if (*s) {
|
---|
| 336 | struct
|
---|
| 337 | {
|
---|
| 338 | ULONG serial;
|
---|
| 339 | CHAR volumelength;
|
---|
| 340 | CHAR volumelabel[CCHMAXPATH];
|
---|
| 341 | }
|
---|
| 342 | volser;
|
---|
[2] | 343 |
|
---|
[551] | 344 | memset(&volser, 0, sizeof(volser));
|
---|
| 345 | DosError(FERR_DISABLEHARDERR);
|
---|
| 346 | if (!DosQueryFSInfo(toupper(*pszFileName) - '@',
|
---|
| 347 | FSIL_VOLSER,
|
---|
| 348 | &volser,
|
---|
| 349 | (ULONG) sizeof(volser)) &&
|
---|
| 350 | stricmp(s, volser.volumelabel)) {
|
---|
| 351 | memmove(s + 1, s, strlen(s) + 1);
|
---|
| 352 | *s = strlen(s + 1);
|
---|
| 353 | DosError(FERR_DISABLEHARDERR);
|
---|
| 354 | rc = DosSetFSInfo(toupper(*pszFileName) - '@',
|
---|
| 355 | 2L, (PVOID) s, (ULONG) sizeof(s));
|
---|
| 356 | if (rc) {
|
---|
| 357 | Dos_Error(MB_CANCEL, rc, hwnd, __FILE__, __LINE__,
|
---|
| 358 | "DosSetFSInfo failed");
|
---|
| 359 | }
|
---|
| 360 | }
|
---|
| 361 | }
|
---|
[2] | 362 | }
|
---|
[551] | 363 | WinDismissDlg(hwnd, 1);
|
---|
| 364 | break;
|
---|
| 365 | }
|
---|
| 366 | return 0;
|
---|
[2] | 367 | }
|
---|
[551] | 368 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
[2] | 369 | }
|
---|
| 370 |
|
---|
[575] | 371 | typedef struct {
|
---|
[2] | 372 | USHORT size;
|
---|
[551] | 373 | CHAR szFileName[CCHMAXPATH];
|
---|
| 374 | BOOL madechanges;
|
---|
[575] | 375 | } FILESTUF;
|
---|
[2] | 376 |
|
---|
[575] | 377 | typedef struct {
|
---|
| 378 | USHORT size;
|
---|
| 379 | PFNWP oldproc;
|
---|
| 380 | FILESTUF *pfs;
|
---|
| 381 | HWND lasthwndMenu;
|
---|
| 382 | } ICONSTUF;
|
---|
| 383 |
|
---|
[2] | 384 | /*
|
---|
| 385 | * subclass routine to allow changing a program's icon
|
---|
| 386 | */
|
---|
| 387 |
|
---|
[551] | 388 | MRESULT EXPENTRY IconProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[162] | 389 | {
|
---|
[575] | 390 | ICONSTUF *pis = (ICONSTUF *)WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 391 | MRESULT mr;
|
---|
| 392 | CHAR *p;
|
---|
| 393 |
|
---|
[2] | 394 | static BOOL emphasized = FALSE;
|
---|
| 395 |
|
---|
[575] | 396 | if (!pis) {
|
---|
[1398] | 397 | Runtime_Error(pszSrcFile, __LINE__, NULL);
|
---|
[575] | 398 | if (msg != WM_DESTROY)
|
---|
| 399 | return WinDefWindowProc(hwnd, msg, mp1, mp2);
|
---|
| 400 | }
|
---|
[2] | 401 |
|
---|
[551] | 402 | switch (msg) {
|
---|
| 403 | case DM_DRAGOVER:
|
---|
| 404 | if (!emphasized) {
|
---|
| 405 | emphasized = TRUE;
|
---|
| 406 | DrawTargetEmphasis(hwnd, emphasized);
|
---|
| 407 | }
|
---|
[618] | 408 | if (AcceptOneDrop(hwnd, mp1, mp2))
|
---|
[551] | 409 | return MRFROM2SHORT(DOR_DROP, DO_MOVE);
|
---|
| 410 | return MRFROM2SHORT(DOR_NEVERDROP, 0);
|
---|
[2] | 411 |
|
---|
[551] | 412 | case DM_DRAGLEAVE:
|
---|
| 413 | emphasized = FALSE;
|
---|
| 414 | DrawTargetEmphasis(hwnd, emphasized);
|
---|
| 415 | break;
|
---|
[2] | 416 |
|
---|
[551] | 417 | case DM_DROPHELP:
|
---|
| 418 | DropHelp(mp1, mp2, hwnd, GetPString(IDS_DROPCHGICONHELPTEXT));
|
---|
| 419 | return 0;
|
---|
[2] | 420 |
|
---|
[551] | 421 | case DM_DROP:
|
---|
| 422 | {
|
---|
| 423 | HPOINTER hptr;
|
---|
| 424 | CHAR szFrom[CCHMAXPATH + 2];
|
---|
| 425 | ICONINFO ici;
|
---|
[2] | 426 |
|
---|
[551] | 427 | emphasized = FALSE;
|
---|
| 428 | DrawTargetEmphasis(hwnd, emphasized);
|
---|
[618] | 429 | if (GetOneDrop(hwnd, mp1, mp2, szFrom, sizeof(szFrom))) {
|
---|
[551] | 430 | memset(&ici, 0, sizeof(ICONINFO));
|
---|
| 431 | ici.cb = sizeof(ICONINFO);
|
---|
| 432 | ici.fFormat = ICON_FILE;
|
---|
| 433 | ici.pszFileName = szFrom;
|
---|
[575] | 434 | if (!WinSetFileIcon((PSZ) pis->pfs->szFileName, (PICONINFO) & ici)) {
|
---|
[551] | 435 | ici.fFormat = ICON_CLEAR;
|
---|
[575] | 436 | WinSetFileIcon((PSZ) pis->pfs->szFileName, (PICONINFO) & ici);
|
---|
[551] | 437 | }
|
---|
[575] | 438 | hptr = WinLoadFileIcon(pis->pfs->szFileName, FALSE);
|
---|
[551] | 439 | if (!hptr)
|
---|
[575] | 440 | hptr = (!IsFile(pis->pfs->szFileName)) ? hptrDir : hptrFile;
|
---|
| 441 | if (pis && pis->oldproc) {
|
---|
[551] | 442 | WinShowWindow(hwnd, FALSE);
|
---|
[575] | 443 | pis->oldproc(hwnd, SM_SETHANDLE, MPFROMLONG(hptr), MPVOID);
|
---|
[551] | 444 | WinShowWindow(hwnd, TRUE);
|
---|
| 445 | WinInvalidateRect(WinQueryWindow(hwnd, QW_PARENT), NULL, TRUE);
|
---|
| 446 | }
|
---|
[2] | 447 | }
|
---|
[551] | 448 | }
|
---|
| 449 | return 0;
|
---|
[2] | 450 |
|
---|
[551] | 451 | case WM_PAINT:
|
---|
[575] | 452 | mr = pis->oldproc(hwnd, msg, mp1, mp2);
|
---|
| 453 | PaintRecessedWindow(hwnd, (HPS) 0, FALSE, FALSE);
|
---|
| 454 | return mr;
|
---|
[551] | 455 | break;
|
---|
[2] | 456 |
|
---|
[551] | 457 | case WM_MENUEND:
|
---|
[575] | 458 | if (pis->lasthwndMenu == (HWND)mp2)
|
---|
| 459 | WinDestroyWindow(pis->lasthwndMenu);
|
---|
| 460 | pis->lasthwndMenu = (HWND) 0;
|
---|
[551] | 461 | break;
|
---|
[2] | 462 |
|
---|
[551] | 463 | case WM_CONTEXTMENU:
|
---|
[575] | 464 | if (pis->lasthwndMenu)
|
---|
| 465 | WinDestroyWindow(pis->lasthwndMenu);
|
---|
| 466 | pis->lasthwndMenu = WinLoadMenu(hwnd, FM3ModHandle, FLE_FRAME);
|
---|
| 467 | if (pis->lasthwndMenu) {
|
---|
| 468 | p = strrchr(pis->pfs->szFileName, '.');
|
---|
[1398] | 469 | if (!p || (stricmp(p, PCSZ_DOTICO) && stricmp(p, PCSZ_DOTPTR)))
|
---|
[575] | 470 | WinSendMsg(pis->lasthwndMenu,
|
---|
| 471 | MM_DELETEITEM,
|
---|
| 472 | MPFROM2SHORT(IDM_SELECTALL, TRUE), MPVOID);
|
---|
| 473 | PopupMenu(hwnd, hwnd, pis->lasthwndMenu);
|
---|
[551] | 474 | }
|
---|
| 475 | break;
|
---|
| 476 |
|
---|
| 477 | case WM_COMMAND:
|
---|
| 478 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 479 | case IDM_SELECTALL:
|
---|
| 480 | case IDM_DESELECTALL:
|
---|
| 481 | WinDlgBox(HWND_DESKTOP,
|
---|
| 482 | hwnd,
|
---|
| 483 | SetIconDlgProc,
|
---|
| 484 | FM3ModHandle,
|
---|
| 485 | SETICON_FRAME,
|
---|
| 486 | (PVOID) ((SHORT1FROMMP(mp1) == IDM_SELECTALL) ?
|
---|
[575] | 487 | pis->pfs->szFileName : NULL));
|
---|
[2] | 488 | break;
|
---|
[551] | 489 | }
|
---|
| 490 | return 0;
|
---|
[2] | 491 |
|
---|
[551] | 492 | case WM_DESTROY:
|
---|
| 493 | emphasized = FALSE;
|
---|
[575] | 494 | if (!pis)
|
---|
| 495 | return WinDefWindowProc(hwnd, msg, mp1, mp2);
|
---|
[576] | 496 | else {
|
---|
[805] | 497 | PFNWP oldproc = pis->oldproc;
|
---|
[576] | 498 | if (pis->lasthwndMenu)
|
---|
[805] | 499 | WinDestroyWindow(pis->lasthwndMenu);
|
---|
[1039] | 500 | free(pis);
|
---|
[805] | 501 | return oldproc(hwnd, msg, mp1, mp2);
|
---|
[576] | 502 | }
|
---|
[551] | 503 | break;
|
---|
[2] | 504 | }
|
---|
| 505 |
|
---|
[575] | 506 | return pis->oldproc(hwnd, msg, mp1, mp2);
|
---|
[2] | 507 | }
|
---|
| 508 |
|
---|
[551] | 509 | MRESULT EXPENTRY FileInfoProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[336] | 510 | {
|
---|
[575] | 511 | FILESTUF *pfs;
|
---|
| 512 | ICONSTUF *pis;
|
---|
[805] | 513 | CHAR **ppsz;
|
---|
[2] | 514 |
|
---|
[551] | 515 | switch (msg) {
|
---|
| 516 | case WM_INITDLG:
|
---|
| 517 | if (!mp2) {
|
---|
| 518 | WinDismissDlg(hwnd, 1);
|
---|
| 519 | break;
|
---|
| 520 | }
|
---|
[575] | 521 | pfs = xmallocz(sizeof(FILESTUF), pszSrcFile, __LINE__);
|
---|
| 522 | if (!pfs) {
|
---|
[551] | 523 | WinDismissDlg(hwnd, 1);
|
---|
| 524 | break;
|
---|
| 525 | }
|
---|
[575] | 526 | pfs->size = sizeof(FILESTUF);
|
---|
| 527 | WinSetWindowPtr(hwnd, QWL_USER, pfs);
|
---|
[551] | 528 | {
|
---|
| 529 | USHORT ids[] = { FLE_SIZES, FLE_SLACK, FLE_LASTWRITE, FLE_CREATE,
|
---|
| 530 | FLE_LASTACCESS, 0
|
---|
| 531 | };
|
---|
| 532 | INT x;
|
---|
| 533 | CHAR s[CCHMAXPATH];
|
---|
| 534 |
|
---|
[805] | 535 | ppsz = (CHAR **)mp2;
|
---|
| 536 | for (x = 0; ppsz[x]; x++) {
|
---|
| 537 | if (DosQueryPathInfo(ppsz[x], FIL_QUERYFULLNAME, s, sizeof(s)))
|
---|
| 538 | strcpy(s, ppsz[x]);
|
---|
[551] | 539 | WinSendDlgItemMsg(hwnd,
|
---|
| 540 | FLE_NAME,
|
---|
| 541 | LM_INSERTITEM,
|
---|
| 542 | MPFROM2SHORT(LIT_SORTASCENDING, 0), MPFROMP(s));
|
---|
[2] | 543 | }
|
---|
[551] | 544 | if (!x) {
|
---|
| 545 | WinDismissDlg(hwnd, 1);
|
---|
| 546 | break;
|
---|
[2] | 547 | }
|
---|
[551] | 548 | WinSendDlgItemMsg(hwnd,
|
---|
| 549 | FLE_NAME,
|
---|
| 550 | LM_SELECTITEM, MPFROM2SHORT(0, 0), MPFROMSHORT(TRUE));
|
---|
| 551 | for (x = 0; ids[x]; x++)
|
---|
| 552 | SetPresParams(WinWindowFromID(hwnd, ids[x]),
|
---|
| 553 | &RGBGREY, &RGBBLACK, &RGBBLACK, NULL);
|
---|
| 554 | }
|
---|
[575] | 555 | pis = xmallocz(sizeof(ICONSTUF), pszSrcFile, __LINE__);
|
---|
| 556 | if (!pis) {
|
---|
| 557 | WinDismissDlg(hwnd, 1);
|
---|
| 558 | break;
|
---|
| 559 | }
|
---|
| 560 | WinSetWindowPtr(WinWindowFromID(hwnd, FLE_ICON), QWL_USER, (PVOID) pis);
|
---|
| 561 | pis->size = sizeof(ICONSTUF);
|
---|
| 562 | pis->pfs = pfs;
|
---|
| 563 | pis->oldproc = WinSubclassWindow(WinWindowFromID(hwnd, FLE_ICON),
|
---|
[551] | 564 | IconProc);
|
---|
| 565 | break;
|
---|
[2] | 566 |
|
---|
[551] | 567 | case WM_CONTROL:
|
---|
| 568 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 569 | case FLE_READONLY:
|
---|
| 570 | case FLE_ARCHIVED:
|
---|
| 571 | case FLE_SYSTEM:
|
---|
| 572 | case FLE_HIDDEN:
|
---|
| 573 | switch (SHORT2FROMMP(mp1)) {
|
---|
| 574 | case BN_CLICKED:
|
---|
[575] | 575 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 576 | if (pfs && *pfs->szFileName) {
|
---|
[551] | 577 |
|
---|
| 578 | LISTINFO li;
|
---|
[907] | 579 | UINT numfiles = 0, numalloc = 0;
|
---|
[551] | 580 |
|
---|
| 581 | memset(&li, 0, sizeof(LISTINFO));
|
---|
[575] | 582 | if (!AddToList(pfs->szFileName, &li.list, &numfiles, &numalloc)) {
|
---|
[551] | 583 | if (WinDlgBox(HWND_DESKTOP,
|
---|
| 584 | hwnd,
|
---|
| 585 | AttrListDlgProc,
|
---|
| 586 | FM3ModHandle,
|
---|
| 587 | ATR_FRAME, MPFROMP(&li)) && li.list && li.list[0]) {
|
---|
[575] | 588 | pfs->madechanges = TRUE;
|
---|
[551] | 589 | WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
|
---|
| 590 | }
|
---|
| 591 | FreeList(li.list);
|
---|
| 592 | }
|
---|
| 593 | }
|
---|
| 594 | break;
|
---|
[805] | 595 | } // switch
|
---|
[2] | 596 | break;
|
---|
[551] | 597 | case FLE_NAME:
|
---|
| 598 | switch (SHORT2FROMMP(mp1)) {
|
---|
| 599 | case LN_ENTER:
|
---|
| 600 | case LN_SELECT:
|
---|
[575] | 601 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 602 | if (!pfs) {
|
---|
[1398] | 603 | Runtime_Error(pszSrcFile, __LINE__, NULL);
|
---|
[551] | 604 | WinDismissDlg(hwnd, 1);
|
---|
| 605 | }
|
---|
| 606 | else {
|
---|
[2] | 607 |
|
---|
[551] | 608 | SHORT sSelect;
|
---|
[2] | 609 |
|
---|
[551] | 610 | sSelect = (SHORT) WinSendDlgItemMsg(hwnd,
|
---|
| 611 | FLE_NAME,
|
---|
| 612 | LM_QUERYSELECTION,
|
---|
| 613 | MPFROMSHORT(LIT_FIRST), MPVOID);
|
---|
| 614 | if (sSelect >= 0) {
|
---|
[575] | 615 | *pfs->szFileName = 0;
|
---|
[551] | 616 | WinSendDlgItemMsg(hwnd,
|
---|
| 617 | FLE_NAME,
|
---|
| 618 | LM_QUERYITEMTEXT,
|
---|
| 619 | MPFROM2SHORT(sSelect, CCHMAXPATH),
|
---|
[575] | 620 | MPFROMP(pfs->szFileName));
|
---|
| 621 | if (*pfs->szFileName) {
|
---|
[551] | 622 | if (SHORT2FROMMP(mp1) == LN_SELECT)
|
---|
| 623 | WinSendMsg(hwnd, UM_SETDIR, MPVOID, MPVOID);
|
---|
| 624 | else
|
---|
| 625 | DefaultView(hwnd,
|
---|
[575] | 626 | (HWND) 0, (HWND) 0, NULL, 32, pfs->szFileName);
|
---|
[551] | 627 | }
|
---|
| 628 | }
|
---|
| 629 | }
|
---|
| 630 | break;
|
---|
| 631 | }
|
---|
| 632 | break;
|
---|
| 633 | }
|
---|
| 634 | return 0;
|
---|
[2] | 635 |
|
---|
[551] | 636 | case UM_SETDIR:
|
---|
| 637 | WinCheckButton(hwnd, FLE_READONLY, FALSE);
|
---|
| 638 | WinCheckButton(hwnd, FLE_ARCHIVED, FALSE);
|
---|
| 639 | WinCheckButton(hwnd, FLE_SYSTEM, FALSE);
|
---|
| 640 | WinCheckButton(hwnd, FLE_HIDDEN, FALSE);
|
---|
| 641 | WinCheckButton(hwnd, FLE_DIRECTORY, FALSE);
|
---|
| 642 | WinCheckButton(hwnd, FLE_READABLE, FALSE);
|
---|
| 643 | WinCheckButton(hwnd, FLE_WRITEABLE, FALSE);
|
---|
| 644 | WinCheckButton(hwnd, FLE_OPEN, FALSE);
|
---|
| 645 | WinCheckButton(hwnd, FLE_BINARY, FALSE);
|
---|
| 646 | WinCheckButton(hwnd, FLE_ISARCHIVE, FALSE);
|
---|
| 647 | WinSetDlgItemText(hwnd, FLE_ARCNAME, NullStr);
|
---|
| 648 | WinCheckButton(hwnd, FLE_OS2FS, FALSE);
|
---|
| 649 | WinCheckButton(hwnd, FLE_OS2WIN, FALSE);
|
---|
| 650 | WinCheckButton(hwnd, FLE_OS2PM, FALSE);
|
---|
| 651 | WinCheckButton(hwnd, FLE_DOS, FALSE);
|
---|
| 652 | WinCheckButton(hwnd, FLE_32BIT, FALSE);
|
---|
| 653 | WinCheckButton(hwnd, FLE_WINREAL, FALSE);
|
---|
| 654 | WinCheckButton(hwnd, FLE_WINPROT, FALSE);
|
---|
| 655 | WinCheckButton(hwnd, FLE_WINENH, FALSE);
|
---|
| 656 | WinCheckButton(hwnd, FLE_DLL, FALSE);
|
---|
| 657 | WinCheckButton(hwnd, FLE_PHYSDRV, FALSE);
|
---|
| 658 | WinCheckButton(hwnd, FLE_VIRTDRV, FALSE);
|
---|
| 659 | WinCheckButton(hwnd, FLE_PROTDLL, FALSE);
|
---|
[575] | 660 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 661 | if (pfs && *pfs->szFileName) {
|
---|
[551] | 662 | CHAR s[97];
|
---|
[897] | 663 | CHAR szCmmaFmtFileSize[81], szCmmaFmtEASize[81];
|
---|
[1397] | 664 | CHAR szCmmaFmtFileEASize[81], szCmmaFmtFileEASizeK[81], szDate[DATE_BUF_BYTES];
|
---|
[841] | 665 | FILEFINDBUF4L fs;
|
---|
[551] | 666 | HDIR hdir = HDIR_CREATE;
|
---|
[841] | 667 | ULONG apptype = 1;
|
---|
[551] | 668 | FILE *fp;
|
---|
| 669 | HPOINTER hptr;
|
---|
| 670 | ARC_TYPE *info;
|
---|
[2] | 671 |
|
---|
[551] | 672 | DosError(FERR_DISABLEHARDERR);
|
---|
[838] | 673 | if (xDosFindFirst(pfs->szFileName,
|
---|
| 674 | &hdir,
|
---|
| 675 | FILE_NORMAL | FILE_ARCHIVED |
|
---|
| 676 | FILE_DIRECTORY | FILE_READONLY | FILE_HIDDEN |
|
---|
| 677 | FILE_SYSTEM,
|
---|
[841] | 678 | &fs, sizeof(fs), &apptype, FIL_QUERYEASIZEL)) {
|
---|
[551] | 679 | // Not found
|
---|
| 680 | SHORT sSelect, numitems;
|
---|
[2] | 681 |
|
---|
[1395] | 682 | if (!fAlertBeepOff)
|
---|
| 683 | DosBeep(250, 100); // Wake up user
|
---|
[551] | 684 | sSelect = (SHORT) WinSendDlgItemMsg(hwnd,
|
---|
| 685 | FLE_NAME,
|
---|
| 686 | LM_QUERYSELECTION,
|
---|
| 687 | MPFROMSHORT(LIT_FIRST), MPVOID);
|
---|
| 688 | if (sSelect >= 0) {
|
---|
| 689 | WinSendDlgItemMsg(hwnd,
|
---|
| 690 | FLE_NAME,
|
---|
| 691 | LM_DELETEITEM, MPFROMSHORT(sSelect), MPVOID);
|
---|
| 692 | numitems = (SHORT) WinSendDlgItemMsg(hwnd,
|
---|
| 693 | FLE_NAME,
|
---|
| 694 | LM_QUERYITEMCOUNT,
|
---|
| 695 | MPVOID, MPVOID);
|
---|
| 696 | if (numitems)
|
---|
| 697 | PostMsg(WinWindowFromID(hwnd, FLE_NAME),
|
---|
| 698 | LM_SELECTITEM,
|
---|
| 699 | MPFROMSHORT(((sSelect) ? sSelect - 1 : 0)),
|
---|
| 700 | MPFROMSHORT(TRUE));
|
---|
| 701 | }
|
---|
[2] | 702 | }
|
---|
[551] | 703 | else {
|
---|
[1395] | 704 | DosFindClose(hdir);
|
---|
| 705 | FDateFormat(szDate, fs.fdateLastWrite);
|
---|
| 706 | sprintf(s, "%s %02u%s%02u%s%02u",
|
---|
| 707 | szDate,
|
---|
| 708 | fs.ftimeLastWrite.hours, TimeSeparator,
|
---|
| 709 | fs.ftimeLastWrite.minutes, TimeSeparator, fs.ftimeLastWrite.twosecs * 2);
|
---|
[551] | 710 | WinSetDlgItemText(hwnd, FLE_LASTWRITE, s);
|
---|
| 711 | if (fs.fdateCreation.year &&
|
---|
[1395] | 712 | fs.fdateCreation.month && fs.fdateCreation.day) {
|
---|
| 713 | FDateFormat(szDate, fs.fdateCreation);
|
---|
| 714 | sprintf(s, "%s %02u%s%02u%s%02u",
|
---|
| 715 | szDate,
|
---|
| 716 | fs.ftimeCreation.hours, TimeSeparator,
|
---|
| 717 | fs.ftimeCreation.minutes, TimeSeparator, fs.ftimeCreation.twosecs * 2);
|
---|
[551] | 718 | WinSetDlgItemText(hwnd, FLE_CREATE, s);
|
---|
| 719 | }
|
---|
| 720 | if (fs.fdateLastAccess.year &&
|
---|
[1395] | 721 | fs.fdateLastAccess.month && fs.fdateLastAccess.day) {
|
---|
| 722 | FDateFormat(szDate, fs.fdateLastAccess);
|
---|
| 723 | sprintf(s, "%s %02u%s%02u%s%02u",
|
---|
| 724 | szDate,
|
---|
| 725 | fs.ftimeLastAccess.hours, TimeSeparator,
|
---|
| 726 | fs.ftimeLastAccess.minutes, TimeSeparator, fs.ftimeLastAccess.twosecs * 2);
|
---|
[551] | 727 | WinSetDlgItemText(hwnd, FLE_LASTACCESS, s);
|
---|
| 728 | }
|
---|
[897] | 729 | CommaFmtULL(szCmmaFmtFileSize,
|
---|
| 730 | sizeof(szCmmaFmtFileSize), fs.cbFile, ' ');
|
---|
| 731 | CommaFmtULL(szCmmaFmtEASize,
|
---|
| 732 | sizeof(szCmmaFmtEASize), CBLIST_TO_EASIZE(fs.cbList), ' ');
|
---|
| 733 | CommaFmtULL(szCmmaFmtFileEASize,
|
---|
| 734 | sizeof(szCmmaFmtFileEASize),
|
---|
| 735 | fs.cbFile + CBLIST_TO_EASIZE(fs.cbList),
|
---|
| 736 | ' ');
|
---|
| 737 | CommaFmtULL(szCmmaFmtFileEASizeK,
|
---|
| 738 | sizeof(szCmmaFmtFileEASizeK),
|
---|
| 739 | fs.cbFile + CBLIST_TO_EASIZE(fs.cbList),
|
---|
| 740 | 'K');
|
---|
[551] | 741 | sprintf(s,
|
---|
| 742 | GetPString(IDS_SIZEINCLEASTEXT),
|
---|
[897] | 743 | szCmmaFmtFileSize,
|
---|
| 744 | szCmmaFmtEASize,
|
---|
| 745 | szCmmaFmtFileEASize,
|
---|
| 746 | szCmmaFmtFileEASizeK);
|
---|
[551] | 747 | WinSetDlgItemText(hwnd, FLE_SIZES, s);
|
---|
[897] | 748 | CommaFmtULL(szCmmaFmtFileSize,
|
---|
| 749 | sizeof(szCmmaFmtFileSize), fs.cbFileAlloc - fs.cbFile, ' ');
|
---|
| 750 | sprintf(s, "%s", szCmmaFmtFileSize);
|
---|
[551] | 751 | WinSetDlgItemText(hwnd, FLE_SLACK, s);
|
---|
| 752 | WinCheckButton(hwnd,
|
---|
| 753 | FLE_READONLY, ((fs.attrFile & FILE_READONLY) != 0));
|
---|
| 754 | WinCheckButton(hwnd,
|
---|
| 755 | FLE_ARCHIVED, ((fs.attrFile & FILE_ARCHIVED) != 0));
|
---|
| 756 | WinCheckButton(hwnd,
|
---|
| 757 | FLE_DIRECTORY, ((fs.attrFile & FILE_DIRECTORY) != 0));
|
---|
| 758 | WinCheckButton(hwnd, FLE_HIDDEN, ((fs.attrFile & FILE_HIDDEN) != 0));
|
---|
| 759 | WinCheckButton(hwnd, FLE_SYSTEM, ((fs.attrFile & FILE_SYSTEM) != 0));
|
---|
| 760 | DosError(FERR_DISABLEHARDERR);
|
---|
[1480] | 761 | if (!DosQueryAppType(pfs->szFileName, &apptype)) {
|
---|
[551] | 762 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), TRUE);
|
---|
| 763 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), TRUE);
|
---|
| 764 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2PM), TRUE);
|
---|
| 765 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BOUND), TRUE);
|
---|
| 766 | WinEnableWindow(WinWindowFromID(hwnd, FLE_32BIT), TRUE);
|
---|
| 767 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DOS), TRUE);
|
---|
| 768 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINPROT), TRUE);
|
---|
| 769 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINREAL), TRUE);
|
---|
| 770 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINENH), TRUE);
|
---|
| 771 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DLL), TRUE);
|
---|
| 772 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PHYSDRV), TRUE);
|
---|
| 773 | WinEnableWindow(WinWindowFromID(hwnd, FLE_VIRTDRV), TRUE);
|
---|
| 774 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PROTDLL), TRUE);
|
---|
| 775 | WinCheckButton(hwnd, FLE_OS2FS,
|
---|
| 776 | ((apptype & FAPPTYP_NOTWINDOWCOMPAT) &&
|
---|
| 777 | !(apptype & FAPPTYP_WINDOWCOMPAT)));
|
---|
| 778 | WinCheckButton(hwnd, FLE_OS2WIN,
|
---|
| 779 | ((apptype & FAPPTYP_WINDOWCOMPAT) &&
|
---|
| 780 | !(apptype & FAPPTYP_NOTWINDOWCOMPAT)));
|
---|
| 781 | WinCheckButton(hwnd, FLE_OS2PM,
|
---|
| 782 | ((apptype & FAPPTYP_WINDOWAPI) ==
|
---|
| 783 | FAPPTYP_WINDOWAPI));
|
---|
| 784 | WinCheckButton(hwnd, FLE_BOUND, ((apptype & FAPPTYP_BOUND) != 0));
|
---|
| 785 | WinCheckButton(hwnd, FLE_DLL, ((apptype & FAPPTYP_DLL) != 0));
|
---|
| 786 | WinCheckButton(hwnd, FLE_DOS, ((apptype & FAPPTYP_DOS) != 0));
|
---|
| 787 | WinCheckButton(hwnd, FLE_PHYSDRV,
|
---|
| 788 | ((apptype & FAPPTYP_PHYSDRV) != 0));
|
---|
| 789 | WinCheckButton(hwnd, FLE_VIRTDRV,
|
---|
| 790 | ((apptype & FAPPTYP_VIRTDRV) != 0));
|
---|
| 791 | WinCheckButton(hwnd, FLE_PROTDLL,
|
---|
| 792 | ((apptype & FAPPTYP_PROTDLL) != 0));
|
---|
| 793 | WinCheckButton(hwnd, FLE_WINREAL,
|
---|
| 794 | ((apptype & FAPPTYP_WINDOWSREAL) != 0));
|
---|
| 795 | WinCheckButton(hwnd, FLE_WINPROT,
|
---|
| 796 | ((apptype & FAPPTYP_WINDOWSPROT) != 0));
|
---|
| 797 | WinCheckButton(hwnd, FLE_32BIT, ((apptype & FAPPTYP_32BIT) != 0));
|
---|
| 798 | WinCheckButton(hwnd, FLE_WINENH, ((apptype & 0x1000) != 0));
|
---|
| 799 | }
|
---|
| 800 | else {
|
---|
| 801 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2FS), FALSE);
|
---|
| 802 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2WIN), FALSE);
|
---|
| 803 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OS2PM), FALSE);
|
---|
| 804 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BOUND), FALSE);
|
---|
| 805 | WinEnableWindow(WinWindowFromID(hwnd, FLE_32BIT), FALSE);
|
---|
| 806 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DOS), FALSE);
|
---|
| 807 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINPROT), FALSE);
|
---|
| 808 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINREAL), FALSE);
|
---|
| 809 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WINENH), FALSE);
|
---|
| 810 | WinEnableWindow(WinWindowFromID(hwnd, FLE_DLL), FALSE);
|
---|
| 811 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PHYSDRV), FALSE);
|
---|
| 812 | WinEnableWindow(WinWindowFromID(hwnd, FLE_VIRTDRV), FALSE);
|
---|
| 813 | WinEnableWindow(WinWindowFromID(hwnd, FLE_PROTDLL), FALSE);
|
---|
| 814 | }
|
---|
[575] | 815 | hptr = WinLoadFileIcon(pfs->szFileName, FALSE);
|
---|
[551] | 816 | WinShowWindow(WinWindowFromID(hwnd, FLE_ICON), FALSE);
|
---|
| 817 | if (hptr) {
|
---|
| 818 | WinSendDlgItemMsg(hwnd,
|
---|
| 819 | FLE_ICON, SM_SETHANDLE, MPFROMLONG(hptr), MPVOID);
|
---|
| 820 | WinShowWindow(WinWindowFromID(hwnd, FLE_ICON), TRUE);
|
---|
| 821 | }
|
---|
| 822 | WinShowWindow(WinWindowFromID(hwnd, FLE_EAS), fs.cbList > 4);
|
---|
| 823 | if (!(fs.attrFile & FILE_DIRECTORY)) {
|
---|
| 824 | WinEnableWindow(WinWindowFromID(hwnd, FLE_READABLE), TRUE);
|
---|
| 825 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WRITEABLE), TRUE);
|
---|
| 826 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OPEN), TRUE);
|
---|
| 827 | WinEnableWindow(WinWindowFromID(hwnd, FLE_ISARCHIVE), TRUE);
|
---|
| 828 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BINARY), TRUE);
|
---|
[805] | 829 | fp = _fsopen(pfs->szFileName, "rb", SH_DENYNO);
|
---|
[551] | 830 | if (fp) {
|
---|
[850] | 831 | char buff[4096]; // 06 Oct 07 SHL protect against NTFS defect
|
---|
[551] | 832 | ULONG len;
|
---|
| 833 | APIRET rc;
|
---|
[2] | 834 |
|
---|
[551] | 835 | len = 512;
|
---|
| 836 | rc = DosRead(fileno(fp), buff, len, &len);
|
---|
| 837 | fclose(fp);
|
---|
| 838 | WinCheckButton(hwnd,
|
---|
| 839 | FLE_BINARY,
|
---|
| 840 | ((len && rc) ? IsBinary(buff, len) : 2));
|
---|
| 841 | WinCheckButton(hwnd, FLE_READABLE, TRUE);
|
---|
[575] | 842 | info = find_type(pfs->szFileName, NULL);
|
---|
[551] | 843 | if (info) {
|
---|
| 844 | WinCheckButton(hwnd, FLE_ISARCHIVE, 1);
|
---|
| 845 | if (info->id)
|
---|
| 846 | WinSetDlgItemText(hwnd, FLE_ARCNAME, info->id);
|
---|
| 847 | }
|
---|
| 848 | }
|
---|
| 849 | else {
|
---|
| 850 | WinCheckButton(hwnd, FLE_ISARCHIVE, 2);
|
---|
| 851 | WinCheckButton(hwnd, FLE_BINARY, 2);
|
---|
| 852 | }
|
---|
[575] | 853 | fp = _fsopen(pfs->szFileName, "ab", SH_DENYNO);
|
---|
[551] | 854 | if (fp) {
|
---|
| 855 | WinCheckButton(hwnd, FLE_WRITEABLE, TRUE);
|
---|
| 856 | fclose(fp);
|
---|
| 857 | }
|
---|
[575] | 858 | fp = _fsopen(pfs->szFileName, "rb", SH_DENYRW);
|
---|
[551] | 859 | if (!fp)
|
---|
| 860 | WinCheckButton(hwnd, FLE_OPEN, TRUE);
|
---|
| 861 | else
|
---|
| 862 | fclose(fp);
|
---|
| 863 | }
|
---|
| 864 | else {
|
---|
| 865 | WinEnableWindow(WinWindowFromID(hwnd, FLE_READABLE), FALSE);
|
---|
| 866 | WinEnableWindow(WinWindowFromID(hwnd, FLE_WRITEABLE), FALSE);
|
---|
| 867 | WinEnableWindow(WinWindowFromID(hwnd, FLE_OPEN), FALSE);
|
---|
| 868 | WinEnableWindow(WinWindowFromID(hwnd, FLE_ISARCHIVE), FALSE);
|
---|
| 869 | WinEnableWindow(WinWindowFromID(hwnd, FLE_BINARY), FALSE);
|
---|
| 870 | }
|
---|
[2] | 871 | }
|
---|
[551] | 872 | }
|
---|
| 873 | return 0;
|
---|
[2] | 874 |
|
---|
[551] | 875 | case WM_COMMAND:
|
---|
| 876 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 877 | case DID_OK:
|
---|
[575] | 878 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 879 | WinDismissDlg(hwnd, (pfs && pfs->madechanges) ? 2 : 1);
|
---|
[551] | 880 | break;
|
---|
| 881 | case IDM_HELP:
|
---|
| 882 | if (hwndHelp)
|
---|
| 883 | WinSendMsg(hwndHelp,
|
---|
| 884 | HM_DISPLAY_HELP,
|
---|
| 885 | MPFROM2SHORT(HELP_INFO, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
| 886 | break;
|
---|
| 887 | case FLE_SETTINGS:
|
---|
[575] | 888 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 889 | if (pfs && *pfs->szFileName)
|
---|
| 890 | OpenObject(pfs->szFileName, Settings, hwnd);
|
---|
[551] | 891 | break;
|
---|
| 892 | case FLE_EAS:
|
---|
[575] | 893 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 894 | if (pfs && *pfs->szFileName) {
|
---|
[2] | 895 |
|
---|
[551] | 896 | CHAR *list[2];
|
---|
[2] | 897 |
|
---|
[575] | 898 | list[0] = pfs->szFileName;
|
---|
[551] | 899 | list[1] = NULL;
|
---|
| 900 | WinDlgBox(HWND_DESKTOP,
|
---|
| 901 | hwnd, DisplayEAsProc, FM3ModHandle, EA_FRAME, (PVOID) list);
|
---|
[2] | 902 | }
|
---|
[551] | 903 | break;
|
---|
| 904 | case DID_CANCEL:
|
---|
[575] | 905 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
| 906 | WinDismissDlg(hwnd, (pfs && pfs->madechanges) ? 2 : 0);
|
---|
[551] | 907 | break;
|
---|
| 908 | }
|
---|
| 909 | return 0;
|
---|
[2] | 910 |
|
---|
[551] | 911 | case WM_DESTROY:
|
---|
[575] | 912 | pfs = WinQueryWindowPtr(hwnd, QWL_USER);
|
---|
[1009] | 913 | xfree(pfs, pszSrcFile, __LINE__);
|
---|
[551] | 914 | break;
|
---|
[2] | 915 | }
|
---|
[551] | 916 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
[2] | 917 | }
|
---|
| 918 |
|
---|
[551] | 919 | MRESULT EXPENTRY SetDrvProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
---|
[336] | 920 | {
|
---|
[551] | 921 | switch (msg) {
|
---|
| 922 | case WM_INITDLG:
|
---|
[1009] | 923 | if (!mp2 || !isalpha(*(CHAR *)mp2))
|
---|
[551] | 924 | WinDismissDlg(hwnd, 0);
|
---|
| 925 | else {
|
---|
[2] | 926 |
|
---|
[551] | 927 | CHAR s[80];
|
---|
[2] | 928 |
|
---|
[1009] | 929 | WinSetWindowULong(hwnd, QWL_USER, (toupper(*(CHAR *)mp2) - 'A'));
|
---|
| 930 | sprintf(s, GetPString(IDS_DRIVEFLAGSTITLETEXT), toupper(*(CHAR *)mp2));
|
---|
[551] | 931 | WinSetWindowText(hwnd, s);
|
---|
| 932 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
| 933 | }
|
---|
| 934 | break;
|
---|
[2] | 935 |
|
---|
[551] | 936 | case UM_UNDO:
|
---|
| 937 | {
|
---|
| 938 | ULONG drive = WinQueryWindowULong(hwnd, QWL_USER);
|
---|
[2] | 939 |
|
---|
[551] | 940 | WinCheckButton(hwnd, DVS_REMOVABLE,
|
---|
| 941 | ((driveflags[drive] & DRIVE_REMOVABLE) != 0));
|
---|
| 942 | WinCheckButton(hwnd, DVS_NOTWRITEABLE,
|
---|
| 943 | ((driveflags[drive] & DRIVE_NOTWRITEABLE) != 0));
|
---|
| 944 | WinCheckButton(hwnd, DVS_IGNORE,
|
---|
| 945 | ((driveflags[drive] & DRIVE_IGNORE) != 0));
|
---|
| 946 | WinCheckButton(hwnd, DVS_CDROM,
|
---|
| 947 | ((driveflags[drive] & DRIVE_CDROM) != 0));
|
---|
| 948 | WinCheckButton(hwnd, DVS_NOLONGNAMES,
|
---|
| 949 | ((driveflags[drive] & DRIVE_NOLONGNAMES) != 0));
|
---|
| 950 | WinCheckButton(hwnd, DVS_REMOTE,
|
---|
| 951 | ((driveflags[drive] & DRIVE_REMOTE) != 0));
|
---|
[552] | 952 | WinCheckButton(hwnd,DVS_VIRTUAL,
|
---|
[575] | 953 | ((driveflags[drive] & DRIVE_VIRTUAL) != 0));
|
---|
[552] | 954 | WinCheckButton(hwnd,DVS_RAMDISK,
|
---|
[575] | 955 | ((driveflags[drive] & DRIVE_RAMDISK) != 0));
|
---|
[552] | 956 | WinCheckButton(hwnd, DVS_BOOT,
|
---|
[575] | 957 | ((driveflags[drive] & DRIVE_BOOT) != 0));
|
---|
[551] | 958 | WinCheckButton(hwnd, DVS_INVALID,
|
---|
| 959 | ((driveflags[drive] & DRIVE_INVALID) != 0));
|
---|
| 960 | WinCheckButton(hwnd, DVS_NOPRESCAN,
|
---|
| 961 | ((driveflags[drive] & DRIVE_NOPRESCAN) != 0));
|
---|
| 962 | WinCheckButton(hwnd, DVS_ZIPSTREAM,
|
---|
| 963 | ((driveflags[drive] & DRIVE_ZIPSTREAM) != 0));
|
---|
| 964 | WinCheckButton(hwnd, DVS_NOLOADICONS,
|
---|
| 965 | ((driveflags[drive] & DRIVE_NOLOADICONS) != 0));
|
---|
| 966 | WinCheckButton(hwnd, DVS_NOLOADSUBJS,
|
---|
| 967 | ((driveflags[drive] & DRIVE_NOLOADSUBJS) != 0));
|
---|
| 968 | WinCheckButton(hwnd, DVS_NOLOADLONGS,
|
---|
| 969 | ((driveflags[drive] & DRIVE_NOLOADLONGS) != 0));
|
---|
| 970 | WinCheckButton(hwnd, DVS_SLOW, ((driveflags[drive] & DRIVE_SLOW) != 0));
|
---|
| 971 | WinCheckButton(hwnd, DVS_INCLUDEFILES,
|
---|
| 972 | ((driveflags[drive] & DRIVE_INCLUDEFILES) != 0));
|
---|
[552] | 973 | WinCheckButton(hwnd,DVS_NOSTATS,
|
---|
[1354] | 974 | ((driveflags[drive] & DRIVE_NOSTATS) != 0));
|
---|
| 975 | WinCheckButton(hwnd,DVS_WRITEVERIFYOFF,
|
---|
| 976 | ((driveflags[drive] & DRIVE_WRITEVERIFYOFF) != 0));
|
---|
| 977 | WinCheckButton(hwnd,DVS_RSCANNED,
|
---|
[1444] | 978 | ((driveflags[drive] & DRIVE_RSCANNED) != 0));
|
---|
| 979 | WinCheckButton(hwnd,DVS_LOCALHD,
|
---|
| 980 | ((driveflags[drive] & DRIVE_LOCALHD) != 0));
|
---|
| 981 | WinCheckButton(hwnd,DVS_NOEASUPPORT,
|
---|
| 982 | ((driveflags[drive] & DRIVE_NOEASUPPORT) != 0));
|
---|
[551] | 983 | }
|
---|
| 984 | return 0;
|
---|
[2] | 985 |
|
---|
[551] | 986 | case WM_CONTROL:
|
---|
| 987 | return 0;
|
---|
[2] | 988 |
|
---|
[551] | 989 | case WM_COMMAND:
|
---|
| 990 | switch (SHORT1FROMMP(mp1)) {
|
---|
| 991 | case DID_OK:
|
---|
| 992 | {
|
---|
| 993 | ULONG drive = WinQueryWindowULong(hwnd, QWL_USER);
|
---|
[2] | 994 |
|
---|
[551] | 995 | if (WinQueryButtonCheckstate(hwnd, DVS_NOPRESCAN))
|
---|
| 996 | driveflags[drive] |= DRIVE_NOPRESCAN;
|
---|
| 997 | else
|
---|
| 998 | driveflags[drive] &= (~DRIVE_NOPRESCAN);
|
---|
| 999 | if (WinQueryButtonCheckstate(hwnd, DVS_NOLOADICONS))
|
---|
| 1000 | driveflags[drive] |= DRIVE_NOLOADICONS;
|
---|
| 1001 | else
|
---|
| 1002 | driveflags[drive] &= (~DRIVE_NOLOADICONS);
|
---|
| 1003 | if (WinQueryButtonCheckstate(hwnd, DVS_NOLOADSUBJS))
|
---|
| 1004 | driveflags[drive] |= DRIVE_NOLOADSUBJS;
|
---|
| 1005 | else
|
---|
| 1006 | driveflags[drive] &= (~DRIVE_NOLOADSUBJS);
|
---|
| 1007 | if (WinQueryButtonCheckstate(hwnd, DVS_NOLOADLONGS))
|
---|
| 1008 | driveflags[drive] |= DRIVE_NOLOADLONGS;
|
---|
| 1009 | else
|
---|
| 1010 | driveflags[drive] &= (~DRIVE_NOLOADLONGS);
|
---|
| 1011 | if (WinQueryButtonCheckstate(hwnd, DVS_SLOW))
|
---|
| 1012 | driveflags[drive] |= DRIVE_SLOW;
|
---|
| 1013 | else
|
---|
| 1014 | driveflags[drive] &= (~DRIVE_SLOW);
|
---|
| 1015 | if (WinQueryButtonCheckstate(hwnd, DVS_INCLUDEFILES))
|
---|
| 1016 | driveflags[drive] |= DRIVE_INCLUDEFILES;
|
---|
| 1017 | else
|
---|
| 1018 | driveflags[drive] &= (~DRIVE_INCLUDEFILES);
|
---|
[575] | 1019 | if (WinQueryButtonCheckstate(hwnd,DVS_NOSTATS))
|
---|
| 1020 | driveflags[drive] |= DRIVE_NOSTATS;
|
---|
| 1021 | else
|
---|
[1354] | 1022 | driveflags[drive] &= (~DRIVE_NOSTATS);
|
---|
| 1023 | if (WinQueryButtonCheckstate(hwnd,DVS_WRITEVERIFYOFF))
|
---|
| 1024 | driveflags[drive] |= DRIVE_WRITEVERIFYOFF;
|
---|
| 1025 | else
|
---|
| 1026 | driveflags[drive] &= (~DRIVE_WRITEVERIFYOFF);
|
---|
[551] | 1027 | {
|
---|
| 1028 | ULONG flags;
|
---|
[1354] | 1029 | CHAR FlagKey[80];
|
---|
[2] | 1030 |
|
---|
[1354] | 1031 | sprintf(FlagKey, "%c.DriveFlags", (CHAR) (drive + 'A'));
|
---|
[551] | 1032 | flags = driveflags[drive];
|
---|
| 1033 | flags &= (~(DRIVE_REMOVABLE | DRIVE_NOTWRITEABLE |
|
---|
| 1034 | DRIVE_IGNORE | DRIVE_CDROM |
|
---|
[1354] | 1035 | DRIVE_REMOTE | DRIVE_RSCANNED |
|
---|
[575] | 1036 | DRIVE_BOOT | DRIVE_INVALID | DRIVE_ZIPSTREAM |
|
---|
| 1037 | DRIVE_VIRTUAL | DRIVE_RAMDISK));
|
---|
[1354] | 1038 | PrfWriteProfileData(fmprof, appname, FlagKey, &flags, sizeof(ULONG));
|
---|
[551] | 1039 | }
|
---|
| 1040 | }
|
---|
| 1041 | WinDismissDlg(hwnd, 1);
|
---|
| 1042 | break;
|
---|
[2] | 1043 |
|
---|
[551] | 1044 | case DID_CANCEL:
|
---|
| 1045 | WinDismissDlg(hwnd, 0);
|
---|
| 1046 | break;
|
---|
[2] | 1047 |
|
---|
[551] | 1048 | case IDM_UNDO:
|
---|
| 1049 | PostMsg(hwnd, UM_UNDO, MPVOID, MPVOID);
|
---|
| 1050 | break;
|
---|
[2] | 1051 |
|
---|
[551] | 1052 | case IDM_HELP:
|
---|
| 1053 | if (hwndHelp)
|
---|
| 1054 | WinSendMsg(hwndHelp,
|
---|
| 1055 | HM_DISPLAY_HELP,
|
---|
| 1056 | MPFROM2SHORT(HELP_FLAGS, 0), MPFROMSHORT(HM_RESOURCEID));
|
---|
| 1057 | break;
|
---|
| 1058 | }
|
---|
| 1059 | return 0;
|
---|
[2] | 1060 | }
|
---|
[551] | 1061 | return WinDefDlgProc(hwnd, msg, mp1, mp2);
|
---|
[2] | 1062 | }
|
---|
[793] | 1063 |
|
---|
| 1064 | #pragma alloc_text(FMINFO,FileInfoProc,IconProc)
|
---|
| 1065 | #pragma alloc_text(FMINFO2,SetDrvProc,DrvInfoProc)
|
---|