Source code of Windows XP (NT5)
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.

126 lines
2.9 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. #if CLUSTER_BETA
  29. //
  30. // cheesy prototype for turning auth on or off
  31. //
  32. extern "C" VOID ClusapiSetRPCAuthentication(BOOL Authenticate);
  33. #endif
  34. /////////////////////////////////////////////////////////////////////////////
  35. // Global Variables
  36. /////////////////////////////////////////////////////////////////////////////
  37. #ifdef _DEBUG
  38. CTraceTag g_tagCmdLine(_T("App"), _T("CmdLine"), 0);
  39. #endif
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CCluAdminCommandLineInfo
  42. /////////////////////////////////////////////////////////////////////////////
  43. /////////////////////////////////////////////////////////////////////////////
  44. //++
  45. //
  46. // CCluAdminCommandLineInfo::CCluAdminCommandLineInfo
  47. //
  48. // Routine Description:
  49. // Default constructor.
  50. //
  51. // Arguments:
  52. // None.
  53. //
  54. // Return Value:
  55. // None.
  56. //
  57. //--
  58. /////////////////////////////////////////////////////////////////////////////
  59. CCluAdminCommandLineInfo::CCluAdminCommandLineInfo(void)
  60. {
  61. m_nShellCommand = CCommandLineInfo::FileNothing; // Don't want to do a FileNew.
  62. m_bReconnect = TRUE;
  63. } //*** CCluAdminCommandLineInfo::CCluAdminCommandLineInfo()
  64. /////////////////////////////////////////////////////////////////////////////
  65. //++
  66. //
  67. // CCluAdminCommandLineInfo::ParseParam
  68. //
  69. // Routine Description:
  70. // Parse a command line parameter.
  71. //
  72. // Arguments:
  73. // pszParam [IN] Parameter to parse.
  74. // bFlag [IN] TRUE = parameter is a flag.
  75. // bLast [IN] TRUE = parameter is the last parameter on the command line.
  76. //
  77. // Return Value:
  78. // None.
  79. //
  80. //--
  81. /////////////////////////////////////////////////////////////////////////////
  82. void CCluAdminCommandLineInfo::ParseParam(
  83. const TCHAR * pszParam,
  84. BOOL bFlag,
  85. BOOL bLast
  86. )
  87. {
  88. if (bFlag)
  89. {
  90. CString str1;
  91. CString str2;
  92. CString str3;
  93. str1.LoadString(IDS_CMDLINE_NORECONNECT);
  94. str2.LoadString(IDS_CMDLINE_NORECON);
  95. str3.LoadString(IDS_CMDLINE_NORPCAUTH);
  96. if ( (str1.CompareNoCase(pszParam) == 0)
  97. || (str2.CompareNoCase(pszParam) == 0))
  98. m_bReconnect = FALSE;
  99. #if CLUSTER_BETA
  100. else if (str3.CompareNoCase(pszParam) == 0)
  101. ClusapiSetRPCAuthentication(FALSE);
  102. #endif
  103. } // if: this is a flag parameter
  104. else
  105. {
  106. m_lstrClusters.AddTail(pszParam);
  107. m_nShellCommand = CCommandLineInfo::FileOpen;
  108. m_bReconnect = FALSE;
  109. } // else: this is not a flag parameter
  110. } //*** CCluAdminCommandLineInfo::ParseParam()