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.

135 lines
1.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1993 - 1993.
  5. //
  6. // File: myutil.hxx
  7. //
  8. // Contents: Helper APIs for Sharing tool
  9. //
  10. // History: 14-Jun-93 WilliamW Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifndef __MYUTIL_HXX__
  14. #define __MYUTIL_HXX__
  15. //////////////////////////////////////////////////////////////////////////////
  16. //
  17. // Functions
  18. //
  19. //////////////////////////////////////////////////////////////////////////////
  20. //
  21. // String manipulation functions
  22. //
  23. VOID
  24. MyGetLastComponent(
  25. IN PWSTR pszStr,
  26. OUT PWSTR pszPrefix,
  27. OUT PWSTR pszLastComponent
  28. );
  29. PWSTR
  30. MyFindLastComponent(
  31. IN const WCHAR* pszStr
  32. );
  33. VOID
  34. MyGetNextComponent(
  35. IN PWSTR pszStr,
  36. OUT PWSTR pszNextComponent,
  37. OUT PWSTR pszRemaining
  38. );
  39. PWSTR
  40. MyStrStr(
  41. IN PWSTR pszInStr,
  42. IN PWSTR pszInSubStr
  43. );
  44. PWSTR
  45. MyFindPostfix(
  46. IN PWSTR pszString,
  47. IN PWSTR pszPrefix
  48. );
  49. //
  50. // Message and dialog helper functions
  51. //
  52. VOID
  53. MyFormatMessageText(
  54. IN HRESULT dwMsgId,
  55. IN PWSTR pszBuffer,
  56. IN DWORD dwBufferSize,
  57. IN va_list* parglist
  58. );
  59. VOID
  60. MyFormatMessage(
  61. IN HRESULT dwMsgId,
  62. IN PWSTR pszBuffer,
  63. IN DWORD dwBufferSize,
  64. ...
  65. );
  66. PWSTR
  67. NewDup(
  68. IN const WCHAR* psz
  69. );
  70. wchar_t*
  71. wcsistr(
  72. const wchar_t* string1,
  73. const wchar_t* string2
  74. );
  75. PWSTR
  76. GetResourceString(
  77. IN DWORD dwId
  78. );
  79. BOOL
  80. IsDfsRoot(
  81. IN LPWSTR pszRoot
  82. );
  83. DWORD
  84. IsDfsShare(
  85. IN LPWSTR pszServer,
  86. IN LPWSTR pszShare,
  87. OUT BOOL* pfIsDfs
  88. );
  89. BOOL
  90. FindDfsRoot(
  91. IN PWSTR pszDfsPath,
  92. OUT PWSTR pszDfsRoot
  93. );
  94. VOID
  95. StatusMessage(
  96. IN HRESULT hr,
  97. ...
  98. );
  99. VOID
  100. ErrorMessage(
  101. IN HRESULT hr,
  102. ...
  103. );
  104. VOID
  105. DfsErrorMessage(
  106. IN NET_API_STATUS status
  107. );
  108. VOID
  109. Usage(
  110. VOID
  111. );
  112. #endif // __MYUTIL_HXX__