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
1.4 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. //----------------------------------------------------------------------------
  16. VOID
  17. MyFormatMessageText(
  18. IN HRESULT dwMsgId,
  19. IN PWSTR pszBuffer,
  20. IN DWORD dwBufferSize,
  21. IN va_list * parglist
  22. );
  23. DWORD
  24. MyCommonDialog(
  25. IN HWND hwnd,
  26. IN HRESULT dwMsgCode,
  27. IN PWSTR pszCaption,
  28. IN DWORD dwFlags,
  29. IN va_list arglist
  30. );
  31. VOID
  32. MyErrorDialog(
  33. IN HWND hwnd,
  34. IN HRESULT dwErrorCode,
  35. ...
  36. );
  37. HRESULT
  38. MessageFromError(
  39. NET_API_STATUS err
  40. );
  41. //----------------------------------------------------------------------------
  42. class CWaitCursor
  43. {
  44. public:
  45. CWaitCursor(UINT idResCursor = 0);
  46. ~CWaitCursor();
  47. private:
  48. HCURSOR _hcurWait;
  49. HCURSOR _hcurOld;
  50. };
  51. //----------------------------------------------------------------------------
  52. NET_API_STATUS
  53. MyNetpGetDomainNameEx (
  54. IN LPWSTR MachineName,
  55. OUT LPWSTR* DomainNamePtr, // alloc and set ptr (free with NetApiBufferFree)
  56. OUT PBOOL IsWorkgroupName
  57. );
  58. #endif // __UTIL_HXX__