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.

157 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxLoggingOptions.cpp
  5. Abstract:
  6. Implementation of Fax Logging Options Class.
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxLoggingOptions.h"
  14. //
  15. //================== GET ACTIVITY LOGGING OBJECT ==============================
  16. //
  17. STDMETHODIMP
  18. CFaxLoggingOptions::get_ActivityLogging(
  19. /*[out, retval]*/ IFaxActivityLogging **ppActivityLogging
  20. )
  21. /*++
  22. Routine name : CFaxLoggingOptions::get_ActivityLogging
  23. Routine description:
  24. Return Activity Logging Object
  25. Author:
  26. Iv Garber (IvG), June, 2000
  27. Arguments:
  28. ppActivityLogging [out] - the Activity Logging Object
  29. Return Value:
  30. Standard HRESULT code
  31. --*/
  32. {
  33. HRESULT hr = S_OK;
  34. DBG_ENTER (_T("CFaxLoggingOptions::get_ActivityLogging"), hr);
  35. CObjectHandler<CFaxActivityLogging, IFaxActivityLogging> ObjectCreator;
  36. hr = ObjectCreator.GetContainedObject(ppActivityLogging, &m_pActivity, m_pIFaxServerInner);
  37. if (FAILED(hr))
  38. {
  39. AtlReportError(CLSID_FaxLoggingOptions,
  40. GetErrorMsgId(hr),
  41. IID_IFaxLoggingOptions,
  42. hr);
  43. return hr;
  44. }
  45. return hr;
  46. }
  47. //
  48. //================== GET EVENT LOGGING OBJECT ==============================
  49. //
  50. STDMETHODIMP
  51. CFaxLoggingOptions::get_EventLogging(
  52. /*[out, retval]*/ IFaxEventLogging **ppEventLogging
  53. )
  54. /*++
  55. Routine name : CFaxLoggingOptions::get_EventLogging
  56. Routine description:
  57. Return Event Logging Object
  58. Author:
  59. Iv Garber (IvG), June, 2000
  60. Arguments:
  61. ppEventLogging [out] - the Event Logging Object
  62. Return Value:
  63. Standard HRESULT code
  64. --*/
  65. {
  66. HRESULT hr = S_OK;
  67. DBG_ENTER (_T("CFaxLoggingOptions::get_EventLogging"), hr);
  68. CObjectHandler<CFaxEventLogging, IFaxEventLogging> ObjectCreator;
  69. hr = ObjectCreator.GetContainedObject(ppEventLogging, &m_pEvent, m_pIFaxServerInner);
  70. if (FAILED(hr))
  71. {
  72. AtlReportError(CLSID_FaxLoggingOptions,
  73. GetErrorMsgId(hr),
  74. IID_IFaxLoggingOptions,
  75. hr);
  76. return hr;
  77. }
  78. return hr;
  79. }
  80. //
  81. //==================== INTERFACE SUPPORT ERROR INFO =====================
  82. //
  83. STDMETHODIMP
  84. CFaxLoggingOptions::InterfaceSupportsErrorInfo(
  85. REFIID riid
  86. )
  87. /*++
  88. Routine name : CFaxLoggingOptions::InterfaceSupportsErrorInfo
  89. Routine description:
  90. ATL's implementation of Support Error Info
  91. Author:
  92. Iv Garber (IvG), June, 2000
  93. Arguments:
  94. riid [in] - Reference to the Interface
  95. Return Value:
  96. Standard HRESULT code
  97. --*/
  98. {
  99. static const IID* arr[] =
  100. {
  101. &IID_IFaxLoggingOptions,
  102. &IID_IFaxEventLogging, // Contained object
  103. &IID_IFaxActivityLogging // Contained object
  104. };
  105. for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
  106. {
  107. if (InlineIsEqualGUID(*arr[i],riid))
  108. return S_OK;
  109. }
  110. return S_FALSE;
  111. }