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.

55 lines
1.4 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: cmdline.h
  7. //
  8. // Contents: Helper class for parsing the Command Line.
  9. //
  10. // Classes:
  11. //
  12. // Notes:
  13. //
  14. // History: 17-Nov-97 rogerg Created.
  15. //
  16. //--------------------------------------------------------------------------
  17. #ifndef _CMDLINEHELPER_
  18. #define _CMDLINEHELPER_
  19. typedef enum _tagCMDLINE_COMMAND
  20. {
  21. CMDLINE_COMMAND_EMBEDDING = 0x01, // embedding flag was passed in
  22. CMDLINE_COMMAND_REGISTER = 0x02, // register flag was passed in
  23. CMDLINE_COMMAND_LOGON = 0x04, // logon flag was passed in
  24. CMDLINE_COMMAND_LOGOFF = 0x08, // logon flag was passed in
  25. CMDLINE_COMMAND_SCHEDULE = 0x10, // schedule flag was passed in
  26. CMDLINE_COMMAND_IDLE = 0x20, // Idle flag was passed in
  27. } CMDLINE_COMMAND;
  28. class CCmdLine {
  29. public:
  30. CCmdLine();
  31. ~CCmdLine();
  32. void ParseCommandLine();
  33. inline DWORD GetCmdLineFlags() { return m_cmdLineFlags; };
  34. WCHAR* GetJobFile() { return m_pszJobFile; };
  35. private:
  36. BOOL MatchOption(LPSTR lpsz, LPSTR lpszOption);
  37. BOOL MatchOption(LPSTR lpsz, LPSTR lpszOption,BOOL fExactMatch,LPSTR *lpszRemaining);
  38. DWORD m_cmdLineFlags;
  39. WCHAR *m_pszJobFile;
  40. };
  41. #endif // _CMDLINEHELPER_