mirror of
https://github.com/reactos/reactos.git
synced 2024-08-16 16:39:08 +00:00
![He Yang](/assets/img/avatar_default.png)
Make the argument process of command utility "taskkill" behave same as what Windows does. Now options are no longer detected as parameters when placed after options that accept one. For example, `taskkill /im /f` will no longer regard `/f` as a process name. If `/?` and `/f` options appear more than once, an error will be reported, telling they are not allowed more than once. (e.g. `taskkill /f /pid 1000 /f`) If only one option `/f` is given without `/pid` or `/im`, an eerror will be reported, telling that one must specify `/pid` or `/im`. (e.g. `taskkill /f`) Additional changes: - Combine SendCloseMessages() and TerminateProcesses() functions. - Protect new written code with `#ifdef __REACTOS__`
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
/*
|
|
* Task termination utility private definitions
|
|
*
|
|
* Copyright 2010 Andrew Nguyen
|
|
*
|
|
* This library 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 library 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.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
*/
|
|
|
|
#include <windef.h>
|
|
|
|
/* Translation IDs. */
|
|
#define STRING_USAGE 101
|
|
#define STRING_INVALID_OPTION 102
|
|
#define STRING_INVALID_PARAM 103
|
|
#define STRING_MISSING_OPTION 104
|
|
#define STRING_MISSING_PARAM 105
|
|
#define STRING_MUTUAL_EXCLUSIVE 106
|
|
#define STRING_CLOSE_PID_SEARCH 107
|
|
#define STRING_CLOSE_PROC_SRCH 108
|
|
#define STRING_TERM_PID_SEARCH 109
|
|
#define STRING_TERM_PROC_SEARCH 110
|
|
#define STRING_SEARCH_FAILED 111
|
|
#define STRING_ENUM_FAILED 112
|
|
#define STRING_TERMINATE_FAILED 113
|
|
#define STRING_SELF_TERMINATION 114
|
|
#define STRING_PARAM_TOO_MUCH 115
|
|
#define STRING_INVALID_SYNTAX 116
|
|
|