Changeset 1335 for trunk/dll/killproc.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/killproc.c

    r1224 r1335  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2005, 2006 Steven H. Levine
     9  Copyright (c) 2005, 2008 Steven H. Levine
    1010
    1111  24 May 05 SHL Rework Win_Error usage
     
    1919  02 Sep 07 SHL Expand FillKillListThread2 stack to avoid exception in __TNK
    2020  16 JUL 08 GKY Use TMP directory for temp files
     21  10 Dec 08 SHL Integrate exception handler support
    2122
    2223***********************************************************************/
     
    2526#include <string.h>
    2627#include <ctype.h>
    27 #include <process.h>
     28// #include <process.h>
    2829#include <limits.h>
    2930
     
    5354#include "misc.h"                       // PostMsg
    5455#include "fortify.h"
     56#include "excputil.h"                   // xbeginthread
    5557
    5658// Data definitions
     
    451453      listdone = FALSE;
    452454      if (fUseQProcStat) {
    453         if (_beginthread(FillKillListThread2,
    454                          NULL, 65536 + 8192, (PVOID)&hwnd) != -1)
     455        if (xbeginthread(FillKillListThread2,
     456                         65536 + 8192,
     457                         &hwnd,
     458                         pszSrcFile,
     459                         __LINE__) == -1)
     460        {
     461          WinDismissDlg(hwnd, 0);
     462        }
     463        else
    455464          DosSleep(100);                // 05 Aug 07 GKY 250
     465      }
     466      else if (fUseQSysState)
     467        if (xbeginthread(FillKillListThread3,
     468                         65536,
     469                         &hwnd,
     470                         pszSrcFile,
     471                         __LINE__) == -1)
     472        {
     473          WinDismissDlg(hwnd, 0);
     474        }
    456475        else
    457             WinDismissDlg(hwnd, 0);
    458       }
    459       else if (fUseQSysState)
    460         if (_beginthread(FillKillListThread3,
    461                          NULL, 65536, (PVOID) & hwnd) != -1)
    462476          DosSleep(100);//05 Aug 07 GKY 250
     477      else {
     478        if (xbeginthread(FillKillListThread,
     479                         65536,
     480                         &hwnd,
     481                         pszSrcFile,
     482                         __LINE__) == -1)
     483        {
     484          WinDismissDlg(hwnd, 0);
     485        }
    463486        else
    464             WinDismissDlg(hwnd, 0);
    465       else {
    466         if (_beginthread(FillKillListThread,
    467                          NULL, 65536, (PVOID) & hwnd) != -1)
    468487          DosSleep(100);                // 05 Aug 07 GKY 250
    469         else
    470           WinDismissDlg(hwnd, 0);
    471488      }
    472489      break;
Note: See TracChangeset for help on using the changeset viewer.