Changeset 1326 for trunk/dll/init.c
- Timestamp:
- Dec 9, 2008, 3:18:36 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r1320 r1326 68 68 #include <process.h> 69 69 #include <time.h> 70 #include <ctype.h> 70 71 71 72 #define INCL_DOS … … 158 159 159 160 #pragma data_seg(GLOBAL1) 160 HEV DriveScanStart;161 161 HMTX hmtxFM2Delete; 162 162 HMTX hmtxFM2Globals; 163 163 ULONG OS2ver[2]; 164 ULONG sizeBool; 165 ULONG sizeUlong; 166 ULONG sizeInt; 167 ULONG sizePvoid; 164 168 PFNWP PFNWPCnr; 165 169 PFNWP PFNWPMLE; … … 172 176 BOOL fReminimize; 173 177 BOOL fWantFirstTimeInit; 178 BOOL fDrivetoSkip[26]; 174 179 HPOINTER hptrApp; 175 180 HPOINTER hptrArc; … … 707 712 ULONG size; 708 713 714 sizeBool = sizeof(BOOL); 715 sizeUlong = sizeof(ULONG); 716 sizeInt = sizeof(INT); 717 sizePvoid = sizeof(PVOID); 709 718 if (!StringsLoaded()) { 710 719 saymsg(MB_ENTER, … … 986 995 FindSwapperDat(); 987 996 988 size = sizeof(BOOL);997 //size = sizeof(BOOL); 989 998 PrfQueryProfileData(fmprof, 990 999 FM3Str, 991 1000 "SeparateParms", 992 1001 &fSeparateParms, 993 &size );1002 &sizeBool); 994 1003 if (!fSeparateParms) 995 1004 strcpy(appname, FM3Str); … … 1058 1067 WC_MAINWND, 1059 1068 MainWndProc, 1060 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 8);1069 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 8); 1061 1070 WinRegisterClass(hab, 1062 1071 WC_MAINWND2, 1063 1072 MainWndProc2, 1064 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 4);1073 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 4); 1065 1074 WinRegisterClass(hab, 1066 1075 WC_TREECONTAINER, 1067 1076 TreeClientWndProc, 1068 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 2);1077 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 2); 1069 1078 WinRegisterClass(hab, 1070 1079 WC_DIRCONTAINER, 1071 1080 DirClientWndProc, 1072 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 2);1081 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 2); 1073 1082 WinRegisterClass(hab, 1074 1083 WC_COLLECTOR, 1075 1084 CollectorClientWndProc, 1076 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 2);1085 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 2); 1077 1086 WinRegisterClass(hab, 1078 1087 WC_ARCCONTAINER, 1079 1088 ArcClientWndProc, 1080 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 2);1089 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 2); 1081 1090 WinRegisterClass(hab, 1082 1091 WC_MLEEDITOR, 1083 1092 MLEEditorProc, 1084 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 2);1093 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 2); 1085 1094 WinRegisterClass(hab, 1086 1095 WC_INIEDITOR, 1087 1096 IniProc, 1088 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID)* 2);1097 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid * 2); 1089 1098 WinRegisterClass(hab, 1090 1099 WC_TOOLBACK, 1091 1100 ToolBackProc, 1092 1101 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1093 size of(PVOID));1102 sizePvoid); 1094 1103 WinRegisterClass(hab, 1095 1104 WC_DRIVEBACK, 1096 1105 DriveBackProc, 1097 1106 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1098 size of(PVOID));1107 sizePvoid); 1099 1108 WinRegisterClass(hab, 1100 1109 WC_SEEALL, 1101 1110 SeeAllWndProc, 1102 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID));1111 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid); 1103 1112 WinRegisterClass(hab, 1104 1113 WC_NEWVIEW, 1105 1114 ViewWndProc, 1106 CS_SIZEREDRAW | CS_CLIPCHILDREN, size of(PVOID));1115 CS_SIZEREDRAW | CS_CLIPCHILDREN, sizePvoid); 1107 1116 WinRegisterClass(hab, 1108 1117 WC_TOOLBUTTONS, 1109 1118 ChildButtonProc, 1110 1119 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1111 size of(PVOID));1120 sizePvoid); 1112 1121 WinRegisterClass(hab, 1113 1122 WC_DRIVEBUTTONS, 1114 1123 DriveProc, 1115 1124 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1116 size of(PVOID));1125 sizePvoid); 1117 1126 WinRegisterClass(hab, 1118 1127 WC_BUBBLE, 1119 1128 BubbleProc, 1120 1129 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1121 size of(ULONG)* 2);1130 sizeUlong * 2); 1122 1131 WinRegisterClass(hab, 1123 1132 WC_STATUS, 1124 1133 StatusProc, 1125 1134 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1126 size of(ULONG));1135 sizeUlong); 1127 1136 WinRegisterClass(hab, 1128 1137 WC_DIRSTATUS, 1129 1138 DirTextProc, 1130 1139 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1131 size of(ULONG));1140 sizeUlong); 1132 1141 WinRegisterClass(hab, 1133 1142 WC_TREESTATUS, 1134 1143 TreeStatProc, 1135 1144 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1136 size of(ULONG));1145 sizeUlong); 1137 1146 WinRegisterClass(hab, 1138 1147 WC_ARCSTATUS, 1139 1148 ArcTextProc, 1140 1149 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1141 size of(ULONG));1150 sizeUlong); 1142 1151 WinRegisterClass(hab, 1143 1152 WC_COLSTATUS, 1144 1153 CollectorTextProc, 1145 1154 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1146 size of(ULONG));1155 sizeUlong); 1147 1156 WinRegisterClass(hab, 1148 1157 WC_SEESTATUS, 1149 1158 SeeStatusProc, 1150 1159 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1151 size of(ULONG));1160 sizeUlong); 1152 1161 WinRegisterClass(hab, 1153 1162 WC_VIEWSTATUS, 1154 1163 ViewStatusProc, 1155 1164 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1156 size of(ULONG));1165 sizeUlong); 1157 1166 WinRegisterClass(hab, 1158 1167 WC_ERRORWND, 1159 1168 NotifyWndProc, 1160 1169 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1161 size of(PVOID));1170 sizePvoid); 1162 1171 WinRegisterClass(hab, 1163 1172 WC_MINITIME, 1164 1173 MiniTimeProc, 1165 1174 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1166 size of(PVOID)* 2);1175 sizePvoid * 2); 1167 1176 WinRegisterClass(hab, 1168 1177 WC_DATABAR, 1169 DataProc, CS_SIZEREDRAW, size of(PVOID));1178 DataProc, CS_SIZEREDRAW, sizePvoid); 1170 1179 WinRegisterClass(hab, 1171 1180 WC_TREEOPENBUTTON, 1172 1181 OpenButtonProc, 1173 1182 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1174 size of(PVOID));1183 sizePvoid); 1175 1184 WinRegisterClass(hab, 1176 1185 WC_AUTOVIEW, 1177 1186 AutoViewProc, 1178 1187 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1179 size of(PVOID));1188 sizePvoid); 1180 1189 WinRegisterClass(hab, 1181 1190 WC_LED, 1182 1191 LEDProc, 1183 1192 CS_SYNCPAINT | CS_SIZEREDRAW | CS_PARENTCLIP, 1184 size of(PVOID));1193 sizePvoid); 1185 1194 1186 1195 if (DosCreateMutexSem("\\SEM\\GLOBAL1", &hmtxFM2Globals, 0L, FALSE)) … … 1190 1199 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1191 1200 "DosCreateMutexSem"); 1192 if (DosCreateEventSem("\\SEM32\\DRIVESCAN", &DriveScanStart, 0L, FALSE))1201 /*if (DosCreateEventSem("\\SEM32\\DRIVESCAN", &DriveScanStart, 0L, FALSE)) 1193 1202 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1194 1203 GetPString(IDS_CREATESEMFAILED)); 1195 fInitialDriveScan = TRUE; 1204 fInitialDriveScan = TRUE;*/ 1196 1205 1197 1206 /* … … 1237 1246 1238 1247 // load preferences from profile (INI) file 1239 size = sizeof(ULONG); 1240 PrfQueryProfileData(fmprof, appname, "MaxComLineStrg", &MaxComLineStrg, &size); 1248 PrfQueryProfileData(fmprof, appname, "MaxComLineStrg", &MaxComLineStrg, &sizeUlong); 1241 1249 // Give user one chance to reset the default command line length to 1024 (4os2's unexpanded max) 1242 1250 if (MaxComLineStrg == 2048) { 1243 1251 BOOL MaxComLineChecked = FALSE; 1244 1252 1245 size = sizeof(BOOL); 1246 PrfQueryProfileData(fmprof, appname, "MaxComLineChecked", &MaxComLineChecked, &size); 1253 PrfQueryProfileData(fmprof, appname, "MaxComLineChecked", &MaxComLineChecked, &sizeBool); 1247 1254 if (!MaxComLineChecked) { 1248 1255 ret = saymsg(MB_YESNO, … … 1253 1260 MaxComLineStrg = 1024; 1254 1261 MaxComLineChecked = TRUE; 1255 PrfWriteProfileData(fmprof, appname, "MaxComLineChecked", &MaxComLineChecked, size of(BOOL));1262 PrfWriteProfileData(fmprof, appname, "MaxComLineChecked", &MaxComLineChecked, sizeBool); 1256 1263 } 1257 1264 } … … 1293 1300 if (!pszTreeEnvVarList) 1294 1301 return 0; //already complained 1295 size = sizeof(BOOL); 1296 PrfQueryProfileData(fmprof, appname, "ShowTarget", &fShowTarget, &size); 1297 size = sizeof(BOOL); 1298 PrfQueryProfileData(fmprof, appname, "CheckMM", &fCheckMM, &size); 1299 size = sizeof(BOOL); 1300 PrfQueryProfileData(fmprof, appname, "ChangeTarget", &fChangeTarget, &size); 1301 size = sizeof(BOOL); 1302 PrfQueryProfileData(fmprof, appname, "ConfirmTarget", &fConfirmTarget, &size); 1303 size = sizeof(BOOL); 1304 PrfQueryProfileData(fmprof, FM3Str, "CustomFileDlg", &fCustomFileDlg, &size); 1305 size = sizeof(BOOL); 1306 PrfQueryProfileData(fmprof, FM3Str, "SaveMiniCmds", &fSaveMiniCmds, &size); 1307 size = sizeof(BOOL); 1308 PrfQueryProfileData(fmprof, appname, "SaveBigCmds", &fSaveBigCmds, &size); 1309 size = sizeof(BOOL); 1310 PrfQueryProfileData(fmprof, appname, "NoFoldMenu", &fNoFoldMenu, &size); 1311 size = sizeof(BOOL); 1312 PrfQueryProfileData(fmprof, FM3Str, "ThreadNotes", &fThreadNotes, &size); 1313 size = sizeof(BOOL); 1314 PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", &prnpagenums, &size); 1315 size = sizeof(BOOL); 1316 PrfQueryProfileData(fmprof, FM3Str, "Prnalt", &prnalt, &size); 1317 size = sizeof(BOOL); 1318 PrfQueryProfileData(fmprof, FM3Str, "Prnformat", &prnformat, &size); 1319 size = sizeof(BOOL); 1302 PrfQueryProfileData(fmprof, appname, "ShowTarget", &fShowTarget, &sizeBool); 1303 PrfQueryProfileData(fmprof, appname, "CheckMM", &fCheckMM, &sizeBool); 1304 PrfQueryProfileData(fmprof, appname, "ChangeTarget", &fChangeTarget, &sizeBool); 1305 PrfQueryProfileData(fmprof, appname, "ConfirmTarget", &fConfirmTarget, &sizeBool); 1306 PrfQueryProfileData(fmprof, FM3Str, "CustomFileDlg", &fCustomFileDlg, &sizeBool); 1307 PrfQueryProfileData(fmprof, FM3Str, "SaveMiniCmds", &fSaveMiniCmds, &sizeBool); 1308 PrfQueryProfileData(fmprof, appname, "SaveBigCmds", &fSaveBigCmds, &sizeBool); 1309 PrfQueryProfileData(fmprof, appname, "NoFoldMenu", &fNoFoldMenu, &sizeBool); 1310 PrfQueryProfileData(fmprof, FM3Str, "ThreadNotes", &fThreadNotes, &sizeBool); 1311 PrfQueryProfileData(fmprof, FM3Str, "Prnpagenums", &prnpagenums, &sizeBool); 1312 PrfQueryProfileData(fmprof, FM3Str, "Prnalt", &prnalt, &sizeBool); 1313 PrfQueryProfileData(fmprof, FM3Str, "Prnformat", &prnformat, &sizeBool); 1320 1314 PrfQueryProfileData(fmprof, FM3Str, "Prnformfeedbefore", 1321 &prnformfeedbefore, &size); 1322 size = sizeof(BOOL); 1315 &prnformfeedbefore, &sizeBool); 1323 1316 PrfQueryProfileData(fmprof, FM3Str, 1324 "Prnformfeedafter",&prnformfeedafter, &size); 1325 size = sizeof(ULONG); 1326 PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces", &prntabspaces, &size); 1327 size = sizeof(ULONG); 1328 PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", &prnwidth, &size); 1329 size = sizeof(ULONG); 1330 PrfQueryProfileData(fmprof, FM3Str, "Prnlength", &prnlength, &size); 1331 size = sizeof(ULONG); 1332 PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", &prntmargin, &size); 1333 size = sizeof(ULONG); 1334 PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", &prnbmargin, &size); 1335 size = sizeof(ULONG); 1336 PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", &prnlmargin, &size); 1337 size = sizeof(ULONG); 1338 PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", &prnrmargin, &size); 1339 size = sizeof(ULONG); 1340 PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", &prnspacing, &size); 1341 size = sizeof(BOOL); 1342 PrfQueryProfileData(fmprof, FM3Str, "NoDead", &fNoDead, &size); 1343 size = sizeof(BOOL); 1344 PrfQueryProfileData(fmprof, FM3Str, "NoFinger", &fNoFinger, &size); 1345 size = sizeof(BOOL); 1346 PrfQueryProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, &size); 1347 size = sizeof(BOOL); 1317 "Prnformfeedafter",&prnformfeedafter, &sizeBool); 1318 PrfQueryProfileData(fmprof, FM3Str, "Prntabspaces", &prntabspaces, &sizeUlong); 1319 PrfQueryProfileData(fmprof, FM3Str, "Prnwidth", &prnwidth, &sizeUlong); 1320 PrfQueryProfileData(fmprof, FM3Str, "Prnlength", &prnlength, &sizeUlong); 1321 PrfQueryProfileData(fmprof, FM3Str, "Prntmargin", &prntmargin, &sizeUlong); 1322 PrfQueryProfileData(fmprof, FM3Str, "Prnbmargin", &prnbmargin, &sizeUlong); 1323 PrfQueryProfileData(fmprof, FM3Str, "Prnlmargin", &prnlmargin, &sizeUlong); 1324 PrfQueryProfileData(fmprof, FM3Str, "Prnrmargin", &prnrmargin, &sizeUlong); 1325 PrfQueryProfileData(fmprof, FM3Str, "Prnspacing", &prnspacing, &sizeUlong); 1326 PrfQueryProfileData(fmprof, FM3Str, "NoDead", &fNoDead, &sizeBool); 1327 PrfQueryProfileData(fmprof, FM3Str, "NoFinger", &fNoFinger, &sizeBool); 1328 PrfQueryProfileData(fmprof, appname, "SwitchTree", &fSwitchTree, &sizeBool); 1348 1329 PrfQueryProfileData(fmprof, appname, "SwitchTreeExpand", 1349 &fSwitchTreeExpand, &size); 1350 size = sizeof(BOOL); 1330 &fSwitchTreeExpand, &sizeBool); 1351 1331 PrfQueryProfileData(fmprof, appname, "SwitchTreeOnFocus", 1352 &fSwitchTreeOnFocus, &size); 1353 size = sizeof(BOOL); 1332 &fSwitchTreeOnFocus, &sizeBool); 1354 1333 PrfQueryProfileData(fmprof, appname, "CollapseFirst", 1355 &fCollapseFirst, &size); 1356 size = sizeof(BOOL); 1334 &fCollapseFirst, &sizeBool); 1357 1335 PrfQueryProfileData(fmprof, appname, "FilesInTree", 1358 &fFilesInTree, &size); 1359 size = sizeof(BOOL); 1360 PrfQueryProfileData(fmprof, FM3Str, "TopDir", &fTopDir, &size); 1361 size = sizeof(BOOL); 1362 PrfQueryProfileData(fmprof, FM3Str, "LookInDir", &fLookInDir, &size); 1336 &fFilesInTree, &sizeBool); 1337 PrfQueryProfileData(fmprof, FM3Str, "TopDir", &fTopDir, &sizeBool); 1338 PrfQueryProfileData(fmprof, FM3Str, "LookInDir", &fLookInDir, &sizeBool); 1363 1339 PrfQueryProfileString(fmprof, appname, "DefArc", NULL, szDefArc, 1364 1340 sizeof(szDefArc)); 1365 size = sizeof(ULONG);1366 1341 PrfQueryProfileData(fmprof, FM3Str, "AutoviewHeight", 1367 &AutoviewHeight, &size); 1368 size = sizeof(BOOL); 1369 PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", &fKeepCmdLine, &size); 1342 &AutoviewHeight, &sizeUlong); 1343 PrfQueryProfileData(fmprof, FM3Str, "KeepCmdLine", &fKeepCmdLine, &sizeBool); 1370 1344 if (strcmp(realappname, "FM/4")) { 1371 size = sizeof(BOOL); 1372 PrfQueryProfileData(fmprof, FM3Str, "MoreButtons", &fMoreButtons, &size); 1373 size = sizeof(BOOL); 1374 PrfQueryProfileData(fmprof, FM3Str, "Drivebar", &fDrivebar, &size); 1345 PrfQueryProfileData(fmprof, FM3Str, "MoreButtons", &fMoreButtons, &sizeBool); 1346 PrfQueryProfileData(fmprof, FM3Str, "Drivebar", &fDrivebar, &sizeBool); 1375 1347 } 1376 1348 else 1377 1349 fDrivebar = fMoreButtons = TRUE; 1378 size = sizeof(BOOL); 1379 PrfQueryProfileData(fmprof, appname, "NoSearch", &fNoSearch, &size); 1380 size = sizeof(BOOL); 1381 PrfQueryProfileData(fmprof, appname, "GuessType", &fGuessType, &size); 1382 size = sizeof(BOOL); 1383 PrfQueryProfileData(fmprof, appname, "ViewChild", &fViewChild, &size); 1384 size = sizeof(BOOL); 1385 PrfQueryProfileData(fmprof, appname, "ShowEnv", &fShowEnv, &size); 1350 PrfQueryProfileData(fmprof, appname, "NoSearch", &fNoSearch, &sizeBool); 1351 PrfQueryProfileData(fmprof, appname, "GuessType", &fGuessType, &sizeBool); 1352 PrfQueryProfileData(fmprof, appname, "ViewChild", &fViewChild, &sizeBool); 1353 PrfQueryProfileData(fmprof, appname, "ShowEnv", &fShowEnv, &sizeBool); 1386 1354 size = MaxComLineStrg; 1387 1355 PrfQueryProfileData(fmprof, appname, "TreeEnvVarList", pszTreeEnvVarList, &size); 1388 size = sizeof(BOOL); 1389 PrfQueryProfileData(fmprof, appname, "LeaveTree", &fLeaveTree, &size); 1390 size = sizeof(BOOL); 1391 PrfQueryProfileData(fmprof, FM3Str, "Comments", &fComments, &size); 1392 size = sizeof(ULONG); 1393 PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", &fwsAnimate, &size); 1356 PrfQueryProfileData(fmprof, appname, "LeaveTree", &fLeaveTree, &sizeBool); 1357 PrfQueryProfileData(fmprof, FM3Str, "Comments", &fComments, &sizeBool); 1358 PrfQueryProfileData(fmprof, appname, "WS_ANIMATE", &fwsAnimate, &sizeUlong); 1394 1359 if (fwsAnimate) 1395 1360 fwsAnimate = WS_ANIMATE; 1396 size = sizeof(ULONG);1397 size = sizeof(BOOL);1398 1361 PrfQueryProfileData(fmprof, appname, "SelectedAlways", 1399 &fSelectedAlways, &size); 1400 size = sizeof(BOOL); 1401 PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", &fToolbarHelp, &size); 1402 size = sizeof(BOOL); 1403 PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", &fOtherHelp, &size); 1404 size = sizeof(BOOL); 1405 PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", &fDrivebarHelp, &size); 1406 size = sizeof(BOOL); 1407 PrfQueryProfileData(fmprof, appname, "AutoAddDirs", &fAutoAddDirs, &size); 1408 size = sizeof(BOOL); 1362 &fSelectedAlways, &sizeBool); 1363 PrfQueryProfileData(fmprof, FM3Str, "ToolbarHelp", &fToolbarHelp, &sizeBool); 1364 PrfQueryProfileData(fmprof, FM3Str, "OtherHelp", &fOtherHelp, &sizeBool); 1365 PrfQueryProfileData(fmprof, FM3Str, "DrivebarHelp", &fDrivebarHelp, &sizeBool); 1366 PrfQueryProfileData(fmprof, appname, "AutoAddDirs", &fAutoAddDirs, &sizeBool); 1409 1367 PrfQueryProfileData(fmprof, appname, 1410 "AutoAddAllDirs", &fAutoAddAllDirs, &size); 1411 size = sizeof(BOOL); 1368 "AutoAddAllDirs", &fAutoAddAllDirs, &sizeBool); 1412 1369 PrfQueryProfileData(fmprof, FM3Str, "UserListSwitches", 1413 &fUserListSwitches, &size); 1414 size = sizeof(BOOL); 1370 &fUserListSwitches, &sizeBool); 1415 1371 PrfQueryProfileData(fmprof, appname, "UseNewViewer", 1416 &fUseNewViewer, &size); 1417 size = sizeof(BOOL); 1372 &fUseNewViewer, &sizeBool); 1418 1373 PrfQueryProfileData(fmprof, appname, "DefaultDeletePerm", 1419 &fDefaultDeletePerm, &size); 1420 size = sizeof(BOOL); 1374 &fDefaultDeletePerm, &sizeBool); 1421 1375 PrfQueryProfileData(fmprof, FM3Str, "ExternalINIs", 1422 &fExternalINIs, &size); 1423 size = sizeof(BOOL); 1376 &fExternalINIs, &sizeBool); 1424 1377 PrfQueryProfileData(fmprof, FM3Str, "ExternalCollector", 1425 &fExternalCollector, &size); 1426 size = sizeof(BOOL); 1378 &fExternalCollector, &sizeBool); 1427 1379 PrfQueryProfileData(fmprof, FM3Str, "ExternalArcboxes", 1428 &fExternalArcboxes, &size); 1429 size = sizeof(BOOL); 1380 &fExternalArcboxes, &sizeBool); 1430 1381 PrfQueryProfileData(fmprof, FM3Str, "ExternalViewer", 1431 &fExternalViewer, &size); 1432 size = sizeof(BOOL); 1382 &fExternalViewer, &sizeBool); 1433 1383 PrfQueryProfileData(fmprof, FM3Str, "UseQProcStat", 1434 &fUseQProcStat, &size); 1435 size = sizeof(BOOL); 1384 &fUseQProcStat, &sizeBool); 1436 1385 PrfQueryProfileData(fmprof, FM3Str, "UseQSysState", 1437 &fUseQSysState, &size); 1438 size = sizeof(BOOL); 1439 PrfQueryProfileData(fmprof, FM3Str, "DataMin", &fDataMin, &size); 1440 size = sizeof(BOOL); 1441 PrfQueryProfileData(fmprof, appname, "DataToFore", &fDataToFore, &size); 1442 size = sizeof(BOOL); 1386 &fUseQSysState, &sizeBool); 1387 PrfQueryProfileData(fmprof, FM3Str, "DataMin", &fDataMin, &sizeBool); 1388 PrfQueryProfileData(fmprof, appname, "DataToFore", &fDataToFore, &sizeBool); 1443 1389 PrfQueryProfileData(fmprof, appname, "DataShowDrives", 1444 &fDataShowDrives, &size); 1445 size = sizeof(BOOL); 1390 &fDataShowDrives, &sizeBool); 1446 1391 PrfQueryProfileData(fmprof, appname, "DataInclRemote", 1447 &fDataInclRemote, &size); 1448 size = sizeof(BOOL); 1449 PrfQueryProfileData(fmprof, FM3Str, "SplitStatus", &fSplitStatus, &size); 1450 size = sizeof(BOOL); 1392 &fDataInclRemote, &sizeBool); 1393 PrfQueryProfileData(fmprof, FM3Str, "SplitStatus", &fSplitStatus, &sizeBool); 1451 1394 PrfQueryProfileData(fmprof, appname, "FolderAfterExtract", 1452 &fFolderAfterExtract, &size); 1453 size = sizeof(BOOL); 1454 PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", &fDullMin, &size); 1455 size = sizeof(BOOL); 1456 PrfQueryProfileData(fmprof, appname, "BlueLED", &fBlueLED, &size); 1457 size = sizeof(BOOL); 1395 &fFolderAfterExtract, &sizeBool); 1396 PrfQueryProfileData(fmprof, FM3Str, "DullDatabar", &fDullMin, &sizeBool); 1397 PrfQueryProfileData(fmprof, appname, "BlueLED", &fBlueLED, &sizeBool); 1458 1398 PrfQueryProfileData(fmprof, appname, "ConfirmDelete", 1459 &fConfirmDelete, &size); 1460 size = sizeof(BOOL); 1461 PrfQueryProfileData(fmprof, FM3Str, "SaveState", &fSaveState, &size); 1462 size = sizeof(BOOL); 1463 PrfQueryProfileData(fmprof, appname, "SyncUpdates", &fSyncUpdates, &size); 1464 size = sizeof(BOOL); 1465 PrfQueryProfileData(fmprof, appname, "LoadSubject", &fLoadSubject, &size); 1466 size = sizeof(BOOL); 1467 PrfQueryProfileData(fmprof, appname, "UnHilite", &fUnHilite, &size); 1468 size = sizeof(BOOL); 1469 PrfQueryProfileData(fmprof, FM3Str, "TileBackwards", &fTileBackwards, &size); 1470 size = sizeof(BOOL); 1471 PrfQueryProfileData(fmprof, appname, "LoadLongname", &fLoadLongnames, &size); 1472 size = sizeof(BOOL); 1473 PrfQueryProfileData(fmprof, appname, "VerifyWrites", &fVerify, &size); 1399 &fConfirmDelete, &sizeBool); 1400 PrfQueryProfileData(fmprof, FM3Str, "SaveState", &fSaveState, &sizeBool); 1401 if (fSaveState) { 1402 ULONG numsaves = 0; 1403 CHAR szKey[STATE_NAME_MAX_BYTES + 80]; 1404 CHAR szDir[CCHMAXPATH]; 1405 ULONG drvNum; 1406 INT x; 1407 1408 fInitialDriveScan = TRUE; 1409 sprintf(szKey, "%s.NumDirsLastTime", GetPString(IDS_SHUTDOWNSTATE)); 1410 if (PrfQueryProfileData(fmprof, 1411 FM3Str, szKey, (PVOID) &numsaves, &sizeUlong)) { 1412 for (x = numsaves - 1; x >= 0; x--) { 1413 sprintf(szKey, "%s.DirCnrDir.%lu", GetPString(IDS_SHUTDOWNSTATE), x); 1414 size = sizeof(szDir); 1415 if (PrfQueryProfileData(fmprof, FM3Str, szKey, (PVOID) szDir, &size)) { 1416 drvNum = toupper(*szDir) - 'A'; 1417 fDrivetoSkip[drvNum] = TRUE; 1418 } 1419 } 1420 } 1421 } 1422 PrfQueryProfileData(fmprof, appname, "SyncUpdates", &fSyncUpdates, &sizeBool); 1423 PrfQueryProfileData(fmprof, appname, "LoadSubject", &fLoadSubject, &sizeBool); 1424 PrfQueryProfileData(fmprof, appname, "UnHilite", &fUnHilite, &sizeBool); 1425 PrfQueryProfileData(fmprof, FM3Str, "TileBackwards", &fTileBackwards, &sizeBool); 1426 PrfQueryProfileData(fmprof, appname, "LoadLongname", &fLoadLongnames, &sizeBool); 1427 PrfQueryProfileData(fmprof, appname, "VerifyWrites", &fVerify, &sizeBool); 1474 1428 DosSetVerify(fVerify); 1475 size = sizeof(BOOL); 1476 PrfQueryProfileData(fmprof, appname, "DontMoveMouse", &fDontMoveMouse, &size); 1477 size = sizeof(BOOL); 1478 PrfQueryProfileData(fmprof, appname, "NoIconsFiles", &fNoIconsFiles, &size); 1479 size = sizeof(BOOL); 1480 PrfQueryProfileData(fmprof, appname, "NoIconsDirs", &fNoIconsDirs, &size); 1481 size = sizeof(BOOL); 1482 PrfQueryProfileData(fmprof, appname, "ForceUpper", &fForceUpper, &size); 1483 size = sizeof(BOOL); 1484 PrfQueryProfileData(fmprof, appname, "ForceLower", &fForceLower, &size); 1485 size = sizeof(BOOL); 1486 PrfQueryProfileData(fmprof, FM3Str, "TextTools", &fTextTools, &size); 1487 size = sizeof(BOOL); 1488 PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", &fToolTitles, &size); 1489 size = sizeof(BOOL); 1490 PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens, &size); 1491 size = sizeof(BOOL); 1492 PrfQueryProfileData(fmprof, appname, "LinkSetsIcon", &fLinkSetsIcon, &size); 1493 size = sizeof(INT); 1494 PrfQueryProfileData(fmprof, appname, "Sort", &sortFlags, &size); 1495 size = sizeof(INT); 1496 PrfQueryProfileData(fmprof, appname, "TreeSort", &TreesortFlags, &size); 1497 size = sizeof(INT); 1429 PrfQueryProfileData(fmprof, appname, "DontMoveMouse", &fDontMoveMouse, &sizeBool); 1430 PrfQueryProfileData(fmprof, appname, "NoIconsFiles", &fNoIconsFiles, &sizeBool); 1431 PrfQueryProfileData(fmprof, appname, "NoIconsDirs", &fNoIconsDirs, &sizeBool); 1432 PrfQueryProfileData(fmprof, appname, "ForceUpper", &fForceUpper, &sizeBool); 1433 PrfQueryProfileData(fmprof, appname, "ForceLower", &fForceLower, &sizeBool); 1434 PrfQueryProfileData(fmprof, FM3Str, "TextTools", &fTextTools, &sizeBool); 1435 PrfQueryProfileData(fmprof, FM3Str, "ToolTitles", &fToolTitles, &sizeBool); 1436 PrfQueryProfileData(fmprof, appname, "DoubleClickOpens", &fDCOpens, &sizeBool); 1437 PrfQueryProfileData(fmprof, appname, "LinkSetsIcon", &fLinkSetsIcon, &sizeBool); 1438 PrfQueryProfileData(fmprof, appname, "Sort", &sortFlags, &sizeInt); 1439 PrfQueryProfileData(fmprof, appname, "TreeSort", &TreesortFlags, &sizeInt); 1498 1440 PrfQueryProfileData(fmprof, appname, 1499 "CollectorSort", &CollectorsortFlags, &size );1441 "CollectorSort", &CollectorsortFlags, &sizeInt); 1500 1442 size = sizeof(targetdir); 1501 1443 PrfQueryProfileData(fmprof, appname, "Targetdir", targetdir, &size); … … 1504 1446 size = sizeof(extractpath); 1505 1447 PrfQueryProfileData(fmprof, appname, "ExtractPath", extractpath, &size); 1506 size = sizeof(BOOL); 1507 PrfQueryProfileData(fmprof, FM3Str, "FileNamePathCnr", &fFileNameCnrPath, &size); 1448 PrfQueryProfileData(fmprof, FM3Str, "FileNamePathCnr", &fFileNameCnrPath, &sizeBool); 1508 1449 size = sizeof(printer); 1509 1450 PrfQueryProfileData(fmprof, appname, "Printer", printer, &size); … … 1523 1464 size = MaxComLineStrg; 1524 1465 PrfQueryProfileData(fmprof, appname, "Virus", virus, &size); 1525 size = sizeof(BOOL); 1526 PrfQueryProfileData(fmprof, appname, "FtpRunWPSDefault", &fFtpRunWPSDefault, &size); 1466 PrfQueryProfileData(fmprof, appname, "FtpRunWPSDefault", &fFtpRunWPSDefault, &sizeBool); 1527 1467 size = MaxComLineStrg; 1528 1468 PrfQueryProfileData(fmprof, appname, "FTPRun", ftprun, &size); 1529 1469 if (!*ftprun) 1530 1470 fFtpRunWPSDefault = TRUE; 1531 size = sizeof(BOOL); 1532 PrfQueryProfileData(fmprof, appname, "HttpRunWPSDefault", &fHttpRunWPSDefault, &size); 1471 PrfQueryProfileData(fmprof, appname, "HttpRunWPSDefault", &fHttpRunWPSDefault, &sizeBool); 1533 1472 size = MaxComLineStrg; 1534 1473 PrfQueryProfileData(fmprof, appname, "HTTPRun", httprun, &size); … … 1546 1485 PrfQueryProfileData(fmprof, appname, "LastToolbar", lasttoolbar, 1547 1486 &size); 1548 size = sizeof(BOOL);1549 1487 PrfQueryProfileData(fmprof, appname, "LibPathStrictHttpRun", &fLibPathStrictHttpRun, 1550 &size); 1551 size = sizeof(BOOL); 1488 &sizeBool); 1552 1489 PrfQueryProfileData(fmprof, appname, "LibPathStrictFtpRun", &fLibPathStrictFtpRun, 1553 &size); 1554 size = sizeof(BOOL); 1490 &sizeBool); 1555 1491 PrfQueryProfileData(fmprof, appname, "LibPathStrictMailRun", &fLibPathStrictMailRun, 1556 &size); 1557 size = sizeof(BOOL); 1492 &sizeBool); 1558 1493 PrfQueryProfileData(fmprof, appname, "NoMailtoMailRun", &fNoMailtoMailRun, 1559 &size); 1560 size = sizeof(BOOL); 1494 &sizeBool); 1561 1495 PrfQueryProfileData(fmprof, appname, "FollowTree", &fFollowTree, 1562 &size); 1563 size = sizeof(BOOL); 1496 &sizeBool); 1564 1497 PrfQueryProfileData(fmprof, appname, "StartMaximized", 1565 &fStartMaximized, &size );1498 &fStartMaximized, &sizeBool); 1566 1499 if (!fStartMaximized) { 1567 size = sizeof(BOOL);1568 1500 PrfQueryProfileData(fmprof, appname, "StartMinimized", 1569 &fStartMinimized, &size); 1570 } 1571 size = sizeof(BOOL); 1572 PrfQueryProfileData(fmprof, appname, "DefaultCopy", &fCopyDefault, &size); 1573 size = sizeof(BOOL); 1574 PrfQueryProfileData(fmprof, appname, "IdleCopy", &fRealIdle, &size); 1575 size = sizeof(BOOL); 1501 &fStartMinimized, &sizeBool); 1502 } 1503 PrfQueryProfileData(fmprof, appname, "DefaultCopy", &fCopyDefault, &sizeBool); 1504 PrfQueryProfileData(fmprof, appname, "IdleCopy", &fRealIdle, &sizeBool); 1576 1505 PrfQueryProfileData(fmprof, appname, "ArcStuffVisible", 1577 &fArcStuffVisible, &size); 1578 size = sizeof(BOOL); 1579 PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", &fNoTreeGap, &size); 1580 size = sizeof(BOOL); 1506 &fArcStuffVisible, &sizeBool); 1507 PrfQueryProfileData(fmprof, FM3Str, "NoTreeGap", &fNoTreeGap, &sizeBool); 1581 1508 PrfQueryProfileData(fmprof, FM3Str, "VTreeOpensWPS", 1582 &fVTreeOpensWPS, &size); 1583 size = sizeof(BOOL); 1584 PrfQueryProfileData(fmprof, appname, "RemoteBug", &fRemoteBug, &size); 1585 size = sizeof(BOOL); 1509 &fVTreeOpensWPS, &sizeBool); 1510 PrfQueryProfileData(fmprof, appname, "RemoteBug", &fRemoteBug, &sizeBool); 1586 1511 PrfQueryProfileData(fmprof, appname, "Drag&DropDlg", 1587 &fDragndropDlg, &size); 1588 size = sizeof(BOOL); 1589 PrfQueryProfileData(fmprof, FM3Str, "UserComboBox", &fUserComboBox, &size); 1590 size = sizeof(BOOL); 1591 PrfQueryProfileData(fmprof, FM3Str, "MinDirOnOpen", &fMinOnOpen, &size); 1592 size = sizeof(BOOL); 1512 &fDragndropDlg, &sizeBool); 1513 PrfQueryProfileData(fmprof, FM3Str, "UserComboBox", &fUserComboBox, &sizeBool); 1514 PrfQueryProfileData(fmprof, FM3Str, "MinDirOnOpen", &fMinOnOpen, &sizeBool); 1593 1515 PrfQueryProfileData(fmprof, appname, "QuickArcFind", 1594 &fQuickArcFind, &size); 1595 size = sizeof(BOOL); 1516 &fQuickArcFind, &sizeBool); 1596 1517 PrfQueryProfileData(fmprof, FM3Str, "NoRemovableScan", 1597 &fNoRemovableScan, &size); 1598 size = sizeof(ULONG); 1518 &fNoRemovableScan, &sizeBool); 1599 1519 PrfQueryProfileData(fmprof, FM3Str, "NoBrokenNotify", 1600 &NoBrokenNotify, &size); 1601 size = sizeof(ULONG); 1520 &NoBrokenNotify, &sizeUlong); 1602 1521 PrfQueryProfileData(fmprof, appname, "ContainerType", &ulCnrType, 1603 &size); 1604 size = sizeof(ULONG); 1605 PrfQueryProfileData(fmprof, appname, "FilesToGet", &FilesToGet, &size); 1522 &sizeUlong); 1523 PrfQueryProfileData(fmprof, appname, "FilesToGet", &FilesToGet, &sizeUlong); 1606 1524 if (FilesToGet < FILESTOGET_MIN) 1607 1525 FilesToGet = FILESTOGET_MIN; 1608 1526 else if (FilesToGet > FILESTOGET_MAX) 1609 1527 FilesToGet = FILESTOGET_MAX; 1610 size = sizeof(BOOL); 1611 PrfQueryProfileData(fmprof, FM3Str, "AutoView", &fAutoView, &size); 1612 size = sizeof(BOOL); 1613 PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", &fFM2Deletes, &size); 1614 size = sizeof(BOOL); 1615 PrfQueryProfileData(fmprof, FM3Str, "TrashCan", &fTrashCan, &size); 1528 PrfQueryProfileData(fmprof, FM3Str, "AutoView", &fAutoView, &sizeBool); 1529 PrfQueryProfileData(fmprof, FM3Str, "FM2Deletes", &fFM2Deletes, &sizeBool); 1530 PrfQueryProfileData(fmprof, FM3Str, "TrashCan", &fTrashCan, &sizeBool); 1616 1531 1617 1532 LoadDetailsSwitches("DirCnr", &dsDirCnrDefault);
Note:
See TracChangeset
for help on using the changeset viewer.