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.

103 lines
2.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. // Copyright (C) 1993-1996 Microsoft Corporation. All Rights Reserved.
  3. //
  4. // MODULE: xputil.h
  5. //
  6. // PURPOSE: Functions that are used by the athena transport integration
  7. //
  8. #include "imnxport.h"
  9. //
  10. // FUNCTION: XPUtil_DupResult()
  11. //
  12. // PURPOSE: Takes an IXPRESULT structure and duplicates the information
  13. // in that structure.
  14. //
  15. // PARAMETERS:
  16. // <in> pIxpResult - IXPRESULT structure to dupe
  17. // <out> *ppDupe - Returned duplicate.
  18. //
  19. // RETURN VALUE:
  20. // HRESULT
  21. //
  22. HRESULT XPUtil_DupResult(LPIXPRESULT pIxpResult, LPIXPRESULT *ppDupe);
  23. //
  24. // FUNCTION: XPUtil_FreeResult()
  25. //
  26. // PURPOSE: Takes an IXPRESULT structure and frees all the memory used
  27. // by that structure.
  28. //
  29. // PARAMETERS:
  30. // <in> pIxpResult - structure to free.
  31. //
  32. void XPUtil_FreeResult(LPIXPRESULT pIxpResult);
  33. //
  34. // FUNCTION: XPUtil_StatusToString()
  35. //
  36. // PURPOSE: Converts the IXPSTATUS enumeration into a string resource id.
  37. //
  38. // PARAMETERS:
  39. // <in> ixpStatus - status value to look up
  40. //
  41. // RETURN VALUE:
  42. // Returns the string resource ID which matches the status value
  43. //
  44. int XPUtil_StatusToString(IXPSTATUS ixpStatus);
  45. LPTSTR XPUtil_NNTPErrorToString(HRESULT hr, LPTSTR pszAccount, LPTSTR pszGroup);
  46. //
  47. // FUNCTION: XPUtil_DisplayIXPError()
  48. //
  49. // PURPOSE: Displays a dialog box with the information from an IXPRESULT
  50. // structure.
  51. //
  52. // PARAMETERS:
  53. // <in> hwndParent - Handle of the window that should parent the dialog.
  54. // <in> pIxpResult - Pointer to the IXPRESULT structure to display.
  55. //
  56. int XPUtil_DisplayIXPError(HWND hwndParent, LPIXPRESULT pIxpResult,
  57. IInternetTransport *pTransport);
  58. class CTransportErrorDlg
  59. {
  60. public:
  61. CTransportErrorDlg(LPIXPRESULT pIxpResult, IInternetTransport *pTransport);
  62. ~CTransportErrorDlg();
  63. BOOL Create(HWND hwndParent);
  64. protected:
  65. static INT_PTR CALLBACK ErrorDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  66. BOOL OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam);
  67. void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  68. void OnClose(HWND hwnd);
  69. void OnDestroy(HWND hwnd);
  70. void ExpandCollapse(BOOL fExpand);
  71. private:
  72. HWND m_hwnd;
  73. BOOL m_fExpanded;
  74. RECT m_rcDlg;
  75. LPIXPRESULT m_pIxpResult;
  76. DWORD m_cyCollapsed;
  77. IInternetTransport *m_pTransport;
  78. };
  79. #define idcXPErrDetails 101
  80. #define idcXPErrSep 102
  81. #define idcXPErrError 103
  82. #define idcXPErrDetailText 104