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.

44 lines
980 B

  1. #include <windows.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <stdio.h>
  5. struct ARGUMENTS
  6. {
  7. char *szArg;
  8. short sArgumentNumber;
  9. ARGUMENTS *pNext;
  10. ARGUMENTS *pPrevious;
  11. };
  12. class kCommandLine
  13. {
  14. private:
  15. short sNumberOfArgs;
  16. short sNumberOfDrives;
  17. ARGUMENTS *pArgListBegin;
  18. ARGUMENTS *pArgListCurrent;
  19. void Add(char *wszArgpass);
  20. void Remove(ARGUMENTS *);
  21. void FindLast();
  22. WORD FillArgumentList();
  23. void DebugOutf(char *szFormat, ...);
  24. ARGUMENTS *GetNext();
  25. ARGUMENTS *GetPrevious();
  26. public:
  27. char *szCommandLine;
  28. char *GetNextArgument();
  29. void Rewind();
  30. char *GetSwitchValue(char *, BOOL bCaseInsensitive);
  31. BOOL IsSpecified(char *, BOOL bCaseInsensitive);
  32. char *GetArgumentByNumber(WORD wArgNum);
  33. WORD GetArgumentNumber(TCHAR *Argument, BOOL CaseInsensitive);
  34. WORD GetNumberOfArguments();
  35. kCommandLine();
  36. ~kCommandLine();
  37. };