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.

148 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxInboundRouting.cpp
  5. Abstract:
  6. Implementation of CFaxInboundRouting Class.
  7. Author:
  8. Iv Garber (IvG) Jun, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxInboundRouting.h"
  14. //
  15. //================== GET METHODS COLLECTION OBJECT ==============================
  16. //
  17. STDMETHODIMP
  18. CFaxInboundRouting::GetMethods(
  19. IFaxInboundRoutingMethods **ppMethods
  20. )
  21. /*++
  22. Routine name : CFaxInboundRouting::GetMethods
  23. Routine description:
  24. Return Methods Collection Object
  25. Author:
  26. Iv Garber (IvG), June, 2000
  27. Arguments:
  28. ppMethods [out] - Ptr to the Place for Methods Collection Object
  29. Return Value:
  30. Standard HRESULT code
  31. --*/
  32. {
  33. HRESULT hr = S_OK;
  34. DBG_ENTER (_T("CFaxInboundRouting::GetMethods"), hr);
  35. CObjectHandler<CFaxInboundRoutingMethods, IFaxInboundRoutingMethods> ObjectCreator;
  36. hr = ObjectCreator.GetObject(ppMethods, m_pIFaxServerInner);
  37. if (FAILED(hr))
  38. {
  39. AtlReportError(CLSID_FaxInboundRouting, GetErrorMsgId(hr), IID_IFaxInboundRouting, hr);
  40. return hr;
  41. }
  42. return hr;
  43. }
  44. //
  45. //================== GET EXTENSIONS COLLECTION OBJECT ==============================
  46. //
  47. STDMETHODIMP
  48. CFaxInboundRouting::GetExtensions(
  49. IFaxInboundRoutingExtensions **ppExtensions
  50. )
  51. /*++
  52. Routine name : CFaxInboundRouting::GetExtensions
  53. Routine description:
  54. Return Extensions Collection Object
  55. Author:
  56. Iv Garber (IvG), June, 2000
  57. Arguments:
  58. ppExtensions [out] - Ptr to the Place for Extensions Collection Object
  59. Return Value:
  60. Standard HRESULT code
  61. --*/
  62. {
  63. HRESULT hr = S_OK;
  64. DBG_ENTER (_T("CFaxInboundRouting::GetExtensions"), hr);
  65. CObjectHandler<CFaxInboundRoutingExtensions, IFaxInboundRoutingExtensions> ObjectCreator;
  66. hr = ObjectCreator.GetObject(ppExtensions, m_pIFaxServerInner);
  67. if (FAILED(hr))
  68. {
  69. AtlReportError(CLSID_FaxInboundRouting, GetErrorMsgId(hr), IID_IFaxInboundRouting, hr);
  70. return hr;
  71. }
  72. return hr;
  73. }
  74. //
  75. //===================== SUPPORT ERROR INFO ======================================
  76. //
  77. STDMETHODIMP
  78. CFaxInboundRouting::InterfaceSupportsErrorInfo(
  79. REFIID riid
  80. )
  81. /*++
  82. Routine name : CFaxInboundRouting::InterfaceSupportsErrorInfo
  83. Routine description:
  84. ATL's implementation of Support Error Info.
  85. Author:
  86. Iv Garber (IvG), Jun, 2000
  87. Arguments:
  88. riid [in] - reference to the Interface.
  89. Return Value:
  90. Standard HRESULT code
  91. --*/
  92. {
  93. static const IID* arr[] =
  94. {
  95. &IID_IFaxInboundRouting
  96. };
  97. for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
  98. {
  99. if (InlineIsEqualGUID(*arr[i],riid))
  100. return S_OK;
  101. }
  102. return S_FALSE;
  103. }