Changeset 1335 for trunk/dll/collect.c


Ignore:
Timestamp:
Dec 13, 2008, 12:49:02 AM (17 years ago)
Author:
Steven Levine
Message:

Ticket 26: Add exception handlers to all threads using xbeginthread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/collect.c

    r1221 r1335  
     1
    12/***********************************************************************
    23
     
    5253                DIRCNRDATA struct) into a new struct: DETAILS_SETTINGS.
    5354  20 Jul 08 GKY Add save/append filename to clipboard.
    54                 Change menu wording to make these easier to find
     55                Change menu wording to make these easier to find
    5556  25 Aug 08 GKY Check TMP directory space warn if lee than 5 MiB prevent archiver from opening if
    56                 less than 10 KiB (It hangs and can't be closed)
     57                less than 10 KiB (It hangs and can't be closed)
     58  10 Dec 08 SHL Integrate exception handler support
    5759
    5860***********************************************************************/
     
    6365#include <share.h>
    6466#include <limits.h>
    65 #include <process.h>                    // _beginthread
     67// #include <process.h>                 // _beginthread
    6668
    6769#define INCL_DOS                        // QSV_MS_COUNT
     
    8789#include "notebook.h"                   // CfgDlgProc
    8890#include "command.h"                    // RunCommand
    89 #include "worker.h"                     // Action, MassAction
    90 #include "notify.h"                     // AddNote
    91 #include "misc.h"                       // AdjustCnrColsForPref, AdjustDetailsSwitches, CnrDirectEdit,
     91#include "worker.h"             // Action, MassAction
     92#include "notify.h"             // AddNote
     93#include "misc.h"               // AdjustCnrColsForPref, AdjustDetailsSwitches, CnrDirectEdit,
    9294                                        // LoadDetailsSwitches, OpenEdit, QuickPopup, SayFilter
    9395                                        // SaySort, SayView, SetCnrCols, SetDetailsSwitches
     
    9799#include "collect.h"
    98100#include "common.h"                     // CommonCnrProc, CommonCreateTextChildren, CommonFrameWndProc
    99                                         // CommonTextPaint
     101                                // CommonTextPaint
    100102#include "select.h"                     // DeselectAll, HideAll, RemoveAll, SelectAll, SelectList
    101103#include "dirsize.h"                    // DirSizeProc
     
    128130#include "wrappers.h"                   // xDosFindFirst
    129131#include "fortify.h"
     132#include "excputil.h"                   // xbeginthread
    130133
    131134// Data definitions
     
    981984          wk->li = (LISTINFO *) mp1;
    982985          strcpy(wk->directory, dcd->directory);
    983           if (_beginthread(MassAction, NULL, 122880, (PVOID) wk) == -1) {
    984             Runtime_Error(pszSrcFile, __LINE__,
    985                           GetPString(IDS_COULDNTSTARTTHREADTEXT));
     986          if (xbeginthread(MassAction,
     987                           122880,
     988                           wk,
     989                           pszSrcFile,
     990                           __LINE__) == -1)
     991          {
    986992            free(wk);
    987993            FreeListInfo((LISTINFO *) mp1);
     
    10181024          wk->li = (LISTINFO *) mp1;
    10191025          strcpy(wk->directory, dcd->directory);
    1020           if (_beginthread(Action, NULL, 122880, (PVOID) wk) == -1) {
    1021             Runtime_Error(pszSrcFile, __LINE__,
    1022                           GetPString(IDS_COULDNTSTARTTHREADTEXT));
     1026          if (xbeginthread(Action,
     1027                           122880,
     1028                           wk,
     1029                           pszSrcFile,
     1030                           __LINE__) == -1)
     1031          {
    10231032            free(wk);
    10241033            FreeListInfo((LISTINFO *) mp1);
     
    14521461                   MPFROMLONG(CMA_XVERTSPLITBAR));
    14531462
    1454         if (_beginthread(MakeObjWin, NULL, 245760, (PVOID)dcd) == -1) {
     1463        if (xbeginthread(MakeObjWin,
     1464                         245760,
     1465                         dcd,
     1466                         pszSrcFile,
     1467                         __LINE__) == -1)
     1468        {
    14551469          Runtime_Error(pszSrcFile, __LINE__,
    14561470                        GetPString(IDS_COULDNTSTARTTHREADTEXT));
     
    14951509        OpenDirCnr(HWND_DESKTOP, hwndMain, dcd->hwndFrame, FALSE, (PSZ) mp1);
    14961510      else if (mp1 && IsFile(mp1) == 1 &&
    1497                CheckDriveSpaceAvail(ArcTempRoot, ullDATFileSpaceNeeded, ullTmpSpaceNeeded) != 2)
     1511               CheckDriveSpaceAvail(ArcTempRoot, ullDATFileSpaceNeeded, ullTmpSpaceNeeded) != 2)
    14981512        StartArcCnr(HWND_DESKTOP,
    14991513                    dcd->hwndFrame, (CHAR *)mp1, 4, (ARC_TYPE *) mp2);
     
    21962210              switch (SHORT1FROMMP(mp1)) {
    21972211              case IDM_DOITYOURSELF:
    2198               case IDM_APPENDTOCLIP:
    2199               case IDM_APPENDTOCLIPFILENAME:
     2212              case IDM_APPENDTOCLIP:
     2213              case IDM_APPENDTOCLIPFILENAME:
    22002214              case IDM_SAVETOCLIP:
    2201               case IDM_SAVETOCLIPFILENAME:
     2215              case IDM_SAVETOCLIPFILENAME:
    22022216              case IDM_ARCHIVE:
    22032217              case IDM_ARCHIVEM:
Note: See TracChangeset for help on using the changeset viewer.