Changeset 339 for trunk/dll/init.c


Ignore:
Timestamp:
Jul 26, 2006, 3:44:33 AM (19 years ago)
Author:
root
Message:

Use Runtime_Error
Sync with current style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r201 r339  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2001, 2005 Steven H. Levine
     9  Copyright (c) 2001, 2006 Steven H. Levine
    1010
    1111  11 Jun 02 SHL Add CheckVersion
     
    1616  06 Jun 05 SHL indent -i2
    1717  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
    1820
    1921***********************************************************************/
     
    4951extern void _CRT_term(void);
    5052
    51 /*
    52    extern HMODULE FM3ResHandle;
    53    extern ULONG RVMajor,RVMinor;
    54  */
     53static PSZ pszSrcFile = __FILE__;
    5554
    5655VOID FindSwapperDat(VOID)
     
    110109    }
    111110    *filename = (CHAR)nm + '@';
    112     fp = _fsopen(filename, "r", SH_DENYNO);
     111    fp = xfsopen(filename, "r", SH_DENYNO,pszSrcFile,__LINE__);
    113112    if (fp)
    114113    {
     
    410409  if (!StringsLoaded())
    411410  {
    412     DosBeep(50, 100);
    413411    saymsg(MB_ENTER,
    414412           HWND_DESKTOP,
     
    452450                      dllfile,
    453451                      &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)
    467453  {
    468454    saymsg(MB_CANCEL | MB_ICONEXCLAMATION,
     
    472458    return FALSE;
    473459  }
     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
    474479  if (RVMajor < VERMAJOR ||
    475480      (RVMajor == VERMAJOR && RVMinor < VERMINOR))
    476481  {
    477     DosBeep(50, 100);
    478482    saymsg(MB_ENTER,
    479483           HWND_DESKTOP,
     
    557561
    558562  /* _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  }
    564567  /* 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())
    570569    return FALSE;
    571   }
    572 
    573   /* are we the workplace? */
     570
     571  /* are we the workplace shell? */
    574572  env = getenv("WORKPLACE__PROCESS");
    575573  if (!env || stricmp(env, "NO"))
     
    644642    if (!fmprof)
    645643    {
    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");
    651646      return FALSE;
    652647    }
     
    730725  if (!PFNWPCnr || !PFNWPFrame || !PFNWPButton || !PFNWPStatic || !PFNWPMLE)
    731726  {
    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");
    739728    return FALSE;
    740729  }
     
    13941383    }
    13951384    if (fLogFile)
    1396       LogFileHandle = _fsopen("FM2.LOG",
    1397                               "a+",
    1398                               SH_DENYWR);
     1385      LogFileHandle = _fsopen("FM2.LOG","a+",SH_DENYWR);
    13991386    if (hwndHelp)
    1400       WinAssociateHelpInstance(hwndHelp,
    1401                                hwndFrame);
     1387      WinAssociateHelpInstance(hwndHelp,hwndFrame);
    14021388    PostMsg(hwndClient,
    14031389            UM_SETUP,
Note: See TracChangeset for help on using the changeset viewer.