Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
2.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-1997 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // CmdLine.cpp
  7. //
  8. // Abstract:
  9. // Implementation of the CCluAdminCommandLineInfo class.
  10. //
  11. // Author:
  12. // David Potter (davidp) March 31, 1997
  13. //
  14. // Revision History:
  15. //
  16. // Notes:
  17. //
  18. /////////////////////////////////////////////////////////////////////////////
  19. #include "stdafx.h"
  20. #include "CmdLine.h"
  21. #include "TraceTag.h"
  22. #include "resource.h"
  23. #ifdef _DEBUG
  24. #define new DEBUG_NEW
  25. #undef THIS_FILE
  26. static char THIS_FILE[] = __FILE__;
  27. #endif
  28. /////////////////////////////////////////////////////////////////////////////
  29. // Global Variables
  30. /////////////////////////////////////////////////////////////////////////////
  31. #ifdef _DEBUG
  32. CTraceTag g_tagCmdLine(_T("App"), _T("CmdLine"), 0);
  33. #endif
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CCluAdminCommandLineInfo
  36. /////////////////////////////////////////////////////////////////////////////
  37. /////////////////////////////////////////////////////////////////////////////
  38. //++
  39. //
  40. // CCluAdminCommandLineInfo::CCluAdminCommandLineInfo
  41. //
  42. // Routine Description:
  43. // Default constructor.
  44. //
  45. // Arguments:
  46. // None.
  47. //
  48. // Return Value:
  49. // None.
  50. //
  51. //--
  52. /////////////////////////////////////////////////////////////////////////////
  53. CCluAdminCommandLineInfo::CCluAdminCommandLineInfo(void)
  54. {
  55. m_nShellCommand = CCommandLineInfo::FileNothing; // Don't want to do a FileNew.
  56. m_bReconnect = TRUE;
  57. } //*** CCluAdminCommandLineInfo::CCluAdminCommandLineInfo()
  58. /////////////////////////////////////////////////////////////////////////////
  59. //++
  60. //
  61. // CCluAdminCommandLineInfo::ParseParam
  62. //
  63. // Routine Description:
  64. // Parse a command line parameter.
  65. //
  66. // Arguments:
  67. // pszParam [IN] Parameter to parse.
  68. // bFlag [IN] TRUE = parameter is a flag.
  69. // bLast [IN] TRUE = parameter is the last parameter on the command line.
  70. //
  71. // Return Value:
  72. // None.
  73. //
  74. //--
  75. /////////////////////////////////////////////////////////////////////////////
  76. void CCluAdminCommandLineInfo::ParseParam(
  77. const TCHAR * pszParam,
  78. BOOL bFlag,
  79. BOOL bLast
  80. )
  81. {
  82. if (bFlag)
  83. {
  84. CString str1;
  85. CString str2;
  86. str1.LoadString(IDS_CMDLINE_NORECONNECT);
  87. str2.LoadString(IDS_CMDLINE_NORECON);
  88. if ( (str1.CompareNoCase(pszParam) == 0)
  89. || (str2.CompareNoCase(pszParam) == 0))
  90. m_bReconnect = FALSE;
  91. } // if: this is a flag parameter
  92. else
  93. {
  94. m_lstrClusters.AddTail(pszParam);
  95. m_nShellCommand = CCommandLineInfo::FileOpen;
  96. m_bReconnect = FALSE;
  97. } // else: this is not a flag parameter
  98. } //*** CCluAdminCommandLineInfo::ParseParam()