Changeset 339 for trunk/dll/init.c
- Timestamp:
- Jul 26, 2006, 3:44:33 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/init.c
r201 r339 7 7 8 8 Copyright (c) 1993-98 M. Kimes 9 Copyright (c) 2001, 200 5Steven H. Levine9 Copyright (c) 2001, 2006 Steven H. Levine 10 10 11 11 11 Jun 02 SHL Add CheckVersion … … 16 16 06 Jun 05 SHL indent -i2 17 17 06 Jun 05 SHL Rework FindSwapperDat for VAC3.65 compat 18 13 Jul 06 SHL Use Runtime_Error 19 13 Jul 06 SHL Sync with current style 18 20 19 21 ***********************************************************************/ … … 49 51 extern void _CRT_term(void); 50 52 51 /* 52 extern HMODULE FM3ResHandle; 53 extern ULONG RVMajor,RVMinor; 54 */ 53 static PSZ pszSrcFile = __FILE__; 55 54 56 55 VOID FindSwapperDat(VOID) … … 110 109 } 111 110 *filename = (CHAR)nm + '@'; 112 fp = _fsopen(filename, "r", SH_DENYNO);111 fp = xfsopen(filename, "r", SH_DENYNO,pszSrcFile,__LINE__); 113 112 if (fp) 114 113 { … … 410 409 if (!StringsLoaded()) 411 410 { 412 DosBeep(50, 100);413 411 saymsg(MB_ENTER, 414 412 HWND_DESKTOP, … … 452 450 dllfile, 453 451 &FM3ModHandle); 454 if (!rcl) 455 { 456 if (DosExitList(EXLST_ADD, 457 DeInitFM3DLL)) 458 DosBeep(500, 100); 459 rcq = DosQueryProcAddr(FM3ModHandle, 460 1, 461 "ResVersion", 462 &pfnResVersion); 463 if (!rcq) 464 ret = pfnResVersion(&RVMajor, &RVMinor); 465 } 466 else 452 if (rcl) 467 453 { 468 454 saymsg(MB_CANCEL | MB_ICONEXCLAMATION, … … 472 458 return FALSE; 473 459 } 460 else { 461 rc = DosExitList(EXLST_ADD, DeInitFM3DLL); 462 if (rc) 463 { 464 Dos_Error(MB_ENTER, 465 rc, 466 HWND_DESKTOP, 467 pszSrcFile, 468 __LINE__, 469 "DosExitList failed"); 470 } 471 rcq = DosQueryProcAddr(FM3ModHandle, 472 1, 473 "ResVersion", 474 &pfnResVersion); 475 if (!rcq) 476 ret = pfnResVersion(&RVMajor, &RVMinor); 477 } 478 474 479 if (RVMajor < VERMAJOR || 475 480 (RVMajor == VERMAJOR && RVMinor < VERMINOR)) 476 481 { 477 DosBeep(50, 100);478 482 saymsg(MB_ENTER, 479 483 HWND_DESKTOP, … … 557 561 558 562 /* _heapmin() is done in a separate thread -- start it */ 559 if (_beginthread(HeapThread, 560 NULL, 561 32768, 562 NULL) == 563 -1 || 563 if (_beginthread(HeapThread,NULL,32768,NULL) == -1) { 564 Runtime_Error(pszSrcFile, __LINE__, GetPString(IDS_COULDNTSTARTTHREADTEXT)); 565 return FALSE; 566 } 564 567 /* timer messages are sent from a separate thread -- start it */ 565 !StartTimer()) 566 { 567 DosBeep(50, 100); 568 DosSleep(10); 569 DosBeep(50, 100); 568 if (!StartTimer()) 570 569 return FALSE; 571 } 572 573 /* are we the workplace? */ 570 571 /* are we the workplace shell? */ 574 572 env = getenv("WORKPLACE__PROCESS"); 575 573 if (!env || stricmp(env, "NO")) … … 644 642 if (!fmprof) 645 643 { 646 DosBeep(50, 100); 647 DosSleep(10); 648 DosBeep(50, 100); 649 DosSleep(10); 650 DosBeep(50, 100); 644 Win_Error(NULLHANDLE,NULLHANDLE,pszSrcFile,__LINE__, 645 "PrfOpenProfile failed"); 651 646 return FALSE; 652 647 } … … 730 725 if (!PFNWPCnr || !PFNWPFrame || !PFNWPButton || !PFNWPStatic || !PFNWPMLE) 731 726 { 732 DosBeep(50, 100); 733 DosSleep(10); 734 DosBeep(50, 100); 735 DosSleep(10); 736 DosBeep(50, 100); 737 DosSleep(10); 738 DosBeep(50, 100); 727 Runtime_Error(pszSrcFile, __LINE__, "WinQueryClassInfo"); 739 728 return FALSE; 740 729 } … … 1394 1383 } 1395 1384 if (fLogFile) 1396 LogFileHandle = _fsopen("FM2.LOG", 1397 "a+", 1398 SH_DENYWR); 1385 LogFileHandle = _fsopen("FM2.LOG","a+",SH_DENYWR); 1399 1386 if (hwndHelp) 1400 WinAssociateHelpInstance(hwndHelp, 1401 hwndFrame); 1387 WinAssociateHelpInstance(hwndHelp,hwndFrame); 1402 1388 PostMsg(hwndClient, 1403 1389 UM_SETUP,
Note:
See TracChangeset
for help on using the changeset viewer.