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.

143 lines
2.3 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. DWORD
  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. HRESULT
  48. CopySecurityDescriptor(
  49. IN PSECURITY_DESCRIPTOR pSecDesc,
  50. OUT PSECURITY_DESCRIPTOR *ppsdResult
  51. );
  52. UINT
  53. WarnDelShare(
  54. IN HWND hwnd,
  55. IN UINT idMsg,
  56. IN PWSTR pszShare,
  57. IN PWSTR pszPath
  58. );
  59. DWORD
  60. ConfirmStopShare(
  61. IN HWND hDlg,
  62. IN UINT uType,
  63. IN LPWSTR pszName
  64. );
  65. NET_API_STATUS
  66. ShareConnectionInfo(
  67. IN LPWSTR pszShare,
  68. OUT LPDWORD pcConns,
  69. OUT LPDWORD pcOpens
  70. );
  71. VOID
  72. DisplayError(
  73. IN HWND hwnd,
  74. IN HRESULT dwErrorCode,
  75. IN NET_API_STATUS err,
  76. IN PWSTR pszShare
  77. );
  78. VOID
  79. DisplayLanmanError(
  80. IN HWND hwnd,
  81. IN HRESULT dwErrorCode,
  82. IN NET_API_STATUS err,
  83. IN PWSTR pszShare
  84. );
  85. BOOL
  86. IsValidShareName(
  87. IN PCWSTR pszShareName,
  88. OUT HRESULT* uId
  89. );
  90. BOOL
  91. IsValidWin9xShareLength(
  92. IN PCWSTR pszShare
  93. );
  94. VOID
  95. SetErrorFocus(
  96. IN HWND hwnd,
  97. IN UINT idCtrl
  98. );
  99. DWORD
  100. ConfirmReplaceShare(
  101. IN HWND hwnd,
  102. IN PCWSTR pszShareName,
  103. IN PCWSTR pszOldPath,
  104. IN PCWSTR pszNewPath
  105. );
  106. VOID
  107. TrimLeadingAndTrailingSpaces(
  108. IN OUT PWSTR psz
  109. );
  110. BOOL
  111. IsSafeMode(
  112. VOID
  113. );
  114. BOOL
  115. IsGuestAccessMode(
  116. VOID
  117. );
  118. BOOL
  119. IsSimpleUI(
  120. VOID
  121. );
  122. #endif // __UTIL_HXX__