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.

125 lines
4.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-1998 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ClusCfgCommands.h
  7. //
  8. // Abstract:
  9. // This is the class definition file for the CClusCfgCommand and
  10. // associated classes.
  11. //
  12. // Author:
  13. // C. Brent Thomas
  14. //
  15. // Revision History:
  16. // 30 Sep 1998 original
  17. //
  18. // Notes:
  19. //
  20. /////////////////////////////////////////////////////////////////////////////
  21. #ifndef __CLUSCFGCOMMANDS_H_
  22. #define __CLUSCFGCOMMANDS_H_
  23. // The members of the _CLUSCFG_COMMAND_IDS structure are the string IDs of
  24. // two string resources. Member dwCommandStringId identifies a string resource
  25. // that specifies the full text of a command that may be supplied to cluscfg.exe,
  26. // either via a command line option or an entry in an answer file. Member
  27. // dwSubStringId identifies a string resource that specifies the minimum substring
  28. // that may be recognized as that command.
  29. typedef struct _CLUSCFG_COMMAND_IDS
  30. {
  31. DWORD dwCommandStringId; // string Id of the full command
  32. DWORD dwCommandSubStringId; // string Id of the minimum substring
  33. int xNumRequiredParameters; // the number of parameters required by this command
  34. int xNumOptionalParameters; // the number of optional parameters accepted by this command
  35. } CLUSCFG_COMMAND_IDS;
  36. // Objects of the CClusCfgCommand class are used to build a list of all of the
  37. // legal commands that can be passed to ClusCfg.exe, either via a command line
  38. // option or via entries in an answer file. The list is used to recognize the
  39. // command keywords when parsing a command line or answer file entries.
  40. class CClusCfgCommand
  41. {
  42. public:
  43. CClusCfgCommand( void ); // default constructor
  44. CClusCfgCommand( DWORD dwStringId, DWORD dwSubStringId );
  45. ~CClusCfgCommand( void ); // destructor
  46. // Data members
  47. private:
  48. CClusCfgCommand * m_pNextCommand;
  49. DWORD m_dwCommandStringId;
  50. LPTSTR m_ptszCommandString;
  51. DWORD m_dwCommandSubStringId;
  52. LPTSTR m_ptszCommandSubString;
  53. int m_xNumRequiredParameters;
  54. int m_xNumOptionalParameters;
  55. // Member functions
  56. public:
  57. BOOL BuildClusCfgCommandList( HINSTANCE hInstance,
  58. CLUSCFG_COMMAND_IDS * pClusCfgCommandIds );
  59. BOOL RecognizeCommandToken( LPCTSTR ptszToken,
  60. CClusCfgCommand * pClusCfgCommandList );
  61. int GetNumRequiredParameters( void );
  62. int GetNumOptionalParameters( void );
  63. void Reset( void );
  64. DWORD GetCommandStringId( void );
  65. DWORD GetCommandSubStringId( void );
  66. BOOL SetCommandStringPointer( LPTSTR pAddress );
  67. BOOL SetCommandSubStringPointer( LPTSTR pAddress );
  68. private:
  69. BOOL InitializeCommandString( HINSTANCE hInstance, DWORD dwStringId );
  70. BOOL InitializeCommandString( HINSTANCE hInstance );
  71. BOOL InitializeCommandSubString( HINSTANCE hInstance, DWORD dwSubStringId );
  72. BOOL InitializeCommandSubString( HINSTANCE hInstance );
  73. LPTSTR GetCommandString( void );
  74. LPTSTR GetCommandSubString( void );
  75. BOOL SetNextCommandPointer( CClusCfgCommand * pNextCommand );
  76. CClusCfgCommand * GetNextCommandPointer( void );
  77. void SetNumRequiredParameters( int xNumRequiredParameters );
  78. void SetNumOptionalParameters( int xNumOptionalParameters );
  79. BOOL SetCommandStringId( DWORD dwCommandStringId );
  80. BOOL SetCommandSubStringId( DWORD dwCommandStringId );
  81. LPTSTR GetCommandStringPointer( void );
  82. LPTSTR GetCommandSubStringPointer( void );
  83. };
  84. #endif // __CLUSCFGCOMMANDS_H_