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