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 // ShellCommandVersion.cpp: implementation of the CShellCommandVersion class. 23 // 24 ////////////////////////////////////////////////////////////////////// 25 26 #include "ph.h" 27 #include "ShellCommandVersion.h" 28 #include "RegistryExplorer.h" 29 30 #define VER_CMD _T("VER") 31 #define VER_CMD_SHORT_DESC VER_CMD _T(" command displays information about this program.\n") 32 33 ////////////////////////////////////////////////////////////////////// 34 // Construction/Destruction 35 ////////////////////////////////////////////////////////////////////// 36 37 CShellCommandVersion::CShellCommandVersion() 38 { 39 } 40 41 CShellCommandVersion::~CShellCommandVersion() 42 { 43 } 44 45 BOOL CShellCommandVersion::Match(const TCHAR *pchCommand) 46 { 47 return _tcsicmp(pchCommand,VER_CMD) == 0; 48 } 49 50 int CShellCommandVersion::Execute(CConsole &rConsole, CArgumentParser& rArguments) 51 { 52 rConsole.Write(HELLO_MSG); 53 rConsole.Write(VER_MSG); 54 return 0; 55 } 56 57 const TCHAR * CShellCommandVersion::GetHelpString() 58 { 59 return VER_CMD_SHORT_DESC _T("Syntax: ") VER_CMD _T("\n"); 60 } 61 62 const TCHAR * CShellCommandVersion::GetHelpShortDescriptionString() 63 { 64 return VER_CMD_SHORT_DESC; 65 } 66