diff --git a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp index a54e857912..c11ce0e4ae 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp +++ b/win_build/installerv2/redist/Windows/src/boinccas/CAShutdownBOINC.cpp @@ -158,7 +158,6 @@ UINT CAShutdownBOINC::OnExecution() } TerminateProcessEx( tstring(_T("boinc.exe")) ); - return ERROR_SUCCESS; } diff --git a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln index 47db005ca6..b55da9cfdc 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln +++ b/win_build/installerv2/redist/Windows/src/boinccas/boinccas.sln @@ -7,6 +7,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BOINCCAS95", "boinccas95.vc ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testkill", "..\testkill\testkill.vcproj", "{F8FE1FD7-1DB9-4A8B-8FDF-E7C1E360C962}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -21,6 +25,10 @@ Global {49723CA5-DA05-43C0-93AB-6FD30D046910}.Debug.Build.0 = Debug|Win32 {49723CA5-DA05-43C0-93AB-6FD30D046910}.Release.ActiveCfg = Release|Win32 {49723CA5-DA05-43C0-93AB-6FD30D046910}.Release.Build.0 = Release|Win32 + {F8FE1FD7-1DB9-4A8B-8FDF-E7C1E360C962}.Debug.ActiveCfg = Debug|Win32 + {F8FE1FD7-1DB9-4A8B-8FDF-E7C1E360C962}.Debug.Build.0 = Debug|Win32 + {F8FE1FD7-1DB9-4A8B-8FDF-E7C1E360C962}.Release.ActiveCfg = Release|Win32 + {F8FE1FD7-1DB9-4A8B-8FDF-E7C1E360C962}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp b/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp index c243e61d65..47be59d611 100644 --- a/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp +++ b/win_build/installerv2/redist/Windows/src/boinccas/terminate.cpp @@ -91,14 +91,13 @@ int diagnostics_update_process_list( std::vector& ps ) { pProcesses = (PSYSTEM_PROCESSES)pBuffer; do { - BOINC_PROCESS pi; - - // Store the process information we now know about. - pi.dwProcessId = pProcesses->ProcessId; - pi.dwParentProcessId = pProcesses->InheritedFromProcessId; - pi.strProcessName = pProcesses->ProcessName.Buffer; - - ps.push_back(pi); + if (pProcesses->ProcessId) { + BOINC_PROCESS pi; + pi.dwProcessId = pProcesses->ProcessId; + pi.dwParentProcessId = pProcesses->InheritedFromProcessId; + pi.strProcessName = pProcesses->ProcessName.Buffer; + ps.push_back(pi); + } // Move to the next structure if one exists if (!pProcesses->NextEntryDelta) { @@ -153,9 +152,9 @@ BOOL TerminateProcessEx( tstring& strProcessName ) { // Terminate all child processes for (i=0; i < tps.size(); i++) { - BOINC_PROCESS& tp = tps[i]; + BOINC_PROCESS tp = tps[i]; for (j=0; j < ps.size(); j++) { - BOINC_PROCESS& p = ps[j]; + BOINC_PROCESS p = ps[j]; if (tp.dwProcessId == p.dwParentProcessId) { if (TerminateProcessById(p.dwProcessId)) { tps.push_back(p); diff --git a/win_build/installerv2/redist/Windows/src/testkill/ReadMe.txt b/win_build/installerv2/redist/Windows/src/testkill/ReadMe.txt new file mode 100644 index 0000000000..324b5bf97f --- /dev/null +++ b/win_build/installerv2/redist/Windows/src/testkill/ReadMe.txt @@ -0,0 +1,32 @@ +======================================================================== + CONSOLE APPLICATION : testkill Project Overview +======================================================================== + +AppWizard has created this testkill application for you. +This file contains a summary of what you will find in each of the files that +make up your testkill application. + + +testkill.vcproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +testkill.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named testkill.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/win_build/installerv2/redist/Windows/src/testkill/stdafx.cpp b/win_build/installerv2/redist/Windows/src/testkill/stdafx.cpp new file mode 100644 index 0000000000..10b9afb49a --- /dev/null +++ b/win_build/installerv2/redist/Windows/src/testkill/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// testkill.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/win_build/installerv2/redist/Windows/src/testkill/stdafx.h b/win_build/installerv2/redist/Windows/src/testkill/stdafx.h new file mode 100644 index 0000000000..aa2d35d38e --- /dev/null +++ b/win_build/installerv2/redist/Windows/src/testkill/stdafx.h @@ -0,0 +1,93 @@ +// Berkeley Open Infrastructure for Network Computing +// http://boinc.berkeley.edu +// Copyright (C) 2005 University of California +// +// This is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; +// either version 2.1 of the License, or (at your option) any later version. +// +// This software is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Lesser General Public License for more details. +// +// To view the GNU Lesser General Public License visit +// http://www.gnu.org/copyleft/lesser.html +// or write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// + +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#ifndef _STDAFX_H_ +#define _STDAFX_H_ + +// Windows System Libraries +// + +// Modify the following defines if you have to target a platform prior to the ones specified below. +// Refer to MSDN for the latest info on corresponding values for different platforms. + +#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later. +#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#endif + +#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later. +#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later. +#endif + +#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. +#define _WIN32_WINDOWS 0x0400 // Change this to the appropriate value to target Windows Me or later. +#endif + +#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later. +#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 4.0 or later. +#endif + +#ifndef _WIN32_MSI // Need to specify the smallest version of Windows Installer +#define _WIN32_MSI 200 // that supports file hashing. This is version 2.0. +#endif + +//#define WIN32_LEAN_AND_MEAN // This trims down the windows libraries. +//#define WIN32_EXTRA_LEAN // Trims even farther. + + +// Windows Header Files: +#include +#include +#include +#include +#include +#include +#include + +// STL Header Files: +#include +#include +#include +#include +#include +#include + +#ifdef _UNICODE +#define tstring std::wstring +#define tostringstream std::wostringstream +#else +#define tstring std::string +#define tostringstream std::ostringstream +#endif + + +// Define symbols not already defined in the SDK. +// + +#ifndef STATUS_SUCCESS +#define STATUS_SUCCESS ((NTSTATUS)0x00000000L) +#endif + +#endif + diff --git a/win_build/installerv2/redist/Windows/src/testkill/testkill.cpp b/win_build/installerv2/redist/Windows/src/testkill/testkill.cpp new file mode 100644 index 0000000000..b2cacd7499 --- /dev/null +++ b/win_build/installerv2/redist/Windows/src/testkill/testkill.cpp @@ -0,0 +1,11 @@ +// testkill.cpp : Defines the entry point for the console application. +// + +#include "stdafx.h" +#include "terminate.h" + +int _tmain(int argc, _TCHAR* argv[]) +{ + return TerminateProcessEx( tstring(_T("boinc.exe")) );; +} + diff --git a/win_build/installerv2/redist/Windows/src/testkill/testkill.vcproj b/win_build/installerv2/redist/Windows/src/testkill/testkill.vcproj new file mode 100644 index 0000000000..ba0445122a --- /dev/null +++ b/win_build/installerv2/redist/Windows/src/testkill/testkill.vcproj @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/win_build/installerv2/redist/Windows/x86/boinccas.dll b/win_build/installerv2/redist/Windows/x86/boinccas.dll index f99a09f178..6cc3ab0ee6 100644 Binary files a/win_build/installerv2/redist/Windows/x86/boinccas.dll and b/win_build/installerv2/redist/Windows/x86/boinccas.dll differ diff --git a/win_build/installerv2/redist/Windows/x86/boinccas95.dll b/win_build/installerv2/redist/Windows/x86/boinccas95.dll index 4d98754ef4..df9ca5a6e6 100644 Binary files a/win_build/installerv2/redist/Windows/x86/boinccas95.dll and b/win_build/installerv2/redist/Windows/x86/boinccas95.dll differ