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.

74 lines
1.7 KiB

  1. // RemoveRtExt.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ConfigTest.h"
  5. #include "RemoveRtExt.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. typedef unsigned long ULONG_PTR, *PULONG_PTR;
  12. typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
  13. #include "..\..\..\inc\fxsapip.h"
  14. #define USE_EXTENDED_FSPI
  15. #include "..\..\..\inc\faxdev.h"
  16. #include "..\..\inc\efspimp.h"
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CRemoveRtExt dialog
  19. CRemoveRtExt::CRemoveRtExt(HANDLE hFax, CWnd* pParent /*=NULL*/)
  20. : CDialog(CRemoveRtExt::IDD, pParent),
  21. m_hFax (hFax)
  22. {
  23. //{{AFX_DATA_INIT(CRemoveRtExt)
  24. m_cstrExtName = _T("");
  25. //}}AFX_DATA_INIT
  26. }
  27. void CRemoveRtExt::DoDataExchange(CDataExchange* pDX)
  28. {
  29. CDialog::DoDataExchange(pDX);
  30. //{{AFX_DATA_MAP(CRemoveRtExt)
  31. DDX_Text(pDX, IDC_EXTNAME, m_cstrExtName);
  32. //}}AFX_DATA_MAP
  33. }
  34. BEGIN_MESSAGE_MAP(CRemoveRtExt, CDialog)
  35. //{{AFX_MSG_MAP(CRemoveRtExt)
  36. //}}AFX_MSG_MAP
  37. END_MESSAGE_MAP()
  38. /////////////////////////////////////////////////////////////////////////////
  39. // CRemoveRtExt message handlers
  40. void CRemoveRtExt::OnOK()
  41. {
  42. if (!UpdateData ())
  43. {
  44. return;
  45. }
  46. if (!FaxUnregisterRoutingExtension(m_hFax, m_cstrExtName))
  47. {
  48. CString cs;
  49. cs.Format ("Failed while calling FaxUnregisterRoutingExtension (%ld)",
  50. GetLastError ());
  51. AfxMessageBox (cs, MB_OK | MB_ICONHAND);
  52. return;
  53. }
  54. else
  55. {
  56. AfxMessageBox ("Routing extension successfully removed. You need to restart the service for the change to take effect", MB_OK | MB_ICONHAND);
  57. }
  58. }