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.

70 lines
2.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 2000
  5. //
  6. // File: parserutil.h
  7. //
  8. // Contents: Helpful functions for manipulating and validating
  9. // generic command line arguments
  10. //
  11. // History: 07-Sep-2000 JeffJon Created
  12. //
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef _PARSEUTIL_H_
  16. #define _PARSEUTIL_H_
  17. HRESULT MergeArgCommand(PARG_RECORD pCommand1,
  18. PARG_RECORD pCommand2,
  19. PARG_RECORD *ppOutCommand);
  20. DWORD GetPasswdStr(LPTSTR buf,
  21. DWORD buflen,
  22. PDWORD len);
  23. DWORD ValidateAdminPassword(PVOID pArg);
  24. DWORD ValidateUserPassword(PVOID pArg);
  25. DWORD ValidateYesNo(PVOID pArg);
  26. DWORD ValidateGroupScope(PVOID pArg);
  27. DWORD ValidateNever(PVOID pArg);
  28. //+--------------------------------------------------------------------------
  29. //
  30. // Function: ParseNullSeparatedString
  31. //
  32. // Synopsis: Parses a '\0' separated list that ends in "\0\0" into a string
  33. // array
  34. //
  35. // Arguments: [psz - IN] : '\0' separated string to be parsed
  36. // [pszArr - OUT] : the array to receive the parsed strings
  37. // [pnArrEntries - OUT] : the number of strings parsed from the list
  38. //
  39. // Returns:
  40. //
  41. // History: 18-Sep-2000 JeffJon Created
  42. //
  43. //---------------------------------------------------------------------------
  44. void ParseNullSeparatedString(PTSTR psz,
  45. PTSTR** ppszArr,
  46. UINT* pnArrEntries);
  47. //+--------------------------------------------------------------------------
  48. //
  49. // Function: ParseSemicolonSeparatedString
  50. //
  51. // Synopsis: Parses a ';' separated list
  52. //
  53. // Arguments: [psz - IN] : ';' separated string to be parsed
  54. // [pszArr - OUT] : the array to receive the parsed strings
  55. // [pnArrEntries - OUT] : the number of strings parsed from the list
  56. //
  57. // Returns:
  58. //
  59. // History: 14-Apr-2001 JeffJon Created
  60. //
  61. //---------------------------------------------------------------------------
  62. void ParseSemicolonSeparatedString(PTSTR psz,
  63. PTSTR** ppszArr,
  64. UINT* pnArrEntries);
  65. #endif // _PARSEUTIL_H_