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.

152 lines
2.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: util.hxx
  7. //
  8. // Contents: Misc helper functions
  9. //
  10. // History: 5-Apr-95 BruceFo Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __UTIL_HXX__
  14. #define __UTIL_HXX__
  15. VOID
  16. MyFormatMessageText(
  17. IN HRESULT dwMsgId,
  18. IN PWSTR pszBuffer,
  19. IN DWORD dwBufferSize,
  20. IN va_list * parglist
  21. );
  22. DWORD
  23. MyCommonDialog(
  24. IN HWND hwnd,
  25. IN HRESULT dwMsgCode,
  26. IN PWSTR pszCaption,
  27. IN DWORD dwFlags,
  28. IN va_list arglist
  29. );
  30. DWORD
  31. MyConfirmationDialog(
  32. IN HWND hwnd,
  33. IN HRESULT dwMsgCode,
  34. IN DWORD dwFlags,
  35. ...
  36. );
  37. VOID
  38. MyErrorDialog(
  39. IN HWND hwnd,
  40. IN HRESULT dwErrorCode,
  41. ...
  42. );
  43. PWSTR
  44. NewDup(
  45. IN const WCHAR* psz
  46. );
  47. PWSTR
  48. GetResourceString(
  49. IN DWORD dwId
  50. );
  51. PWSTR
  52. FindLastComponent(
  53. IN WCHAR* pszStr
  54. );
  55. PSECURITY_DESCRIPTOR
  56. CopySecurityDescriptor(
  57. IN PSECURITY_DESCRIPTOR pSecDesc
  58. );
  59. UINT
  60. WarnDelShare(
  61. IN HWND hwnd,
  62. IN UINT idMsg,
  63. IN PWSTR pszShare,
  64. IN PWSTR pszPath
  65. );
  66. DWORD
  67. ConfirmStopShare(
  68. IN HWND hDlg,
  69. IN UINT uType,
  70. IN LPWSTR pszName
  71. );
  72. NET_API_STATUS
  73. ShareConnectionInfo(
  74. IN LPWSTR pszShare,
  75. OUT LPDWORD pcConns,
  76. OUT LPDWORD pcOpens
  77. );
  78. VOID
  79. DisplayError(
  80. IN HWND hwnd,
  81. IN HRESULT dwErrorCode,
  82. IN NET_API_STATUS err,
  83. IN PWSTR pszShare
  84. );
  85. VOID
  86. DisplayLanmanError(
  87. IN HWND hwnd,
  88. IN HRESULT dwErrorCode,
  89. IN NET_API_STATUS err,
  90. IN PWSTR pszShare
  91. );
  92. BOOL
  93. IsValidShareName(
  94. IN PCWSTR pszShareName,
  95. OUT HRESULT* uId
  96. );
  97. VOID
  98. SetErrorFocus(
  99. IN HWND hwnd,
  100. IN UINT idCtrl
  101. );
  102. DWORD
  103. ConfirmReplaceShare(
  104. IN HWND hwnd,
  105. IN PCWSTR pszShareName,
  106. IN PCWSTR pszOldPath,
  107. IN PCWSTR pszNewPath
  108. );
  109. BOOL
  110. IsWorkstationProduct(
  111. VOID
  112. );
  113. VOID
  114. TrimLeadingAndTrailingSpaces(
  115. IN OUT PWSTR psz
  116. );
  117. BOOL
  118. IsSafeMode(
  119. VOID
  120. );
  121. BOOL
  122. IsGuestAccessMode(
  123. VOID
  124. );
  125. BOOL
  126. IsSimpleUI(
  127. VOID
  128. );
  129. #endif // __UTIL_HXX__