Reactos
1/*
2 * regexpl - Console Registry Explorer
3 *
4 * Copyright (C) 2000-2005 Nedko Arnaudov <nedko@users.sourceforge.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; see the file COPYING. If not, write to
18 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
22// ShellCommandExit.cpp: implementation of the CShellCommandExit class.
23//
24//////////////////////////////////////////////////////////////////////
25
26#include "ph.h"
27#include "ShellCommandExit.h"
28#include "RegistryExplorer.h"
29
30#define EXIT_CMD _T("EXIT")
31#define EXIT_CMD_SHORT_DESC EXIT_CMD _T(" command termiantes current instance of Registry Explorer.\n")
32//////////////////////////////////////////////////////////////////////
33// Construction/Destruction
34//////////////////////////////////////////////////////////////////////
35
36CShellCommandExit::CShellCommandExit()
37{
38
39}
40
41CShellCommandExit::~CShellCommandExit()
42{
43
44}
45
46BOOL CShellCommandExit::Match(const TCHAR *pchCommand)
47{
48 return _tcsicmp(pchCommand,EXIT_CMD) == 0;
49}
50
51int CShellCommandExit::Execute(CConsole &rConsole, CArgumentParser& rArguments)
52{
53 rConsole.Write(GOODBYE_MSG);
54 return 0;
55}
56
57const TCHAR * CShellCommandExit::GetHelpString()
58{
59 return EXIT_CMD_SHORT_DESC _T("Syntax: ") EXIT_CMD _T("\n");
60}
61
62const TCHAR * CShellCommandExit::GetHelpShortDescriptionString()
63{
64 return EXIT_CMD_SHORT_DESC;
65}
66