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.

123 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxOutgoingMessageIterator.cpp
  5. Abstract:
  6. Implementation of CFaxOutgoingMessageIterator.
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxOutgoingMessageIterator.h"
  14. #include "FaxOutgoingMessage.h"
  15. //
  16. //========================= SUPPORT ERROR INFO =======================================
  17. //
  18. STDMETHODIMP
  19. CFaxOutgoingMessageIterator::InterfaceSupportsErrorInfo(
  20. REFIID riid
  21. )
  22. /*++
  23. Routine name : CFaxOutgoingMessageIterator::InterfaceSupportsErrorInfo
  24. Routine description:
  25. ATL's Support for Error Info.
  26. Author:
  27. Iv Garber (IvG), May, 2000
  28. Arguments:
  29. riid [in] - IID of the Interface
  30. Return Value:
  31. Standard HRESULT code
  32. --*/
  33. {
  34. static const IID* arr[] =
  35. {
  36. &IID_IFaxOutgoingMessageIterator
  37. };
  38. for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
  39. {
  40. if (InlineIsEqualGUID(*arr[i],riid))
  41. return S_OK;
  42. }
  43. return S_FALSE;
  44. }
  45. //
  46. //==================== CREATE ========================================
  47. //
  48. HRESULT
  49. CFaxOutgoingMessageIterator::Create (
  50. IFaxOutgoingMessageIterator **pOutgoingMsgIterator
  51. )
  52. /*++
  53. Routine name : CFaxOutgoingMessageIterator::Create
  54. Routine description:
  55. Static function to create the Fax Outgoing Message Iterator Object
  56. Author:
  57. Iv Garber (IvG), May, 2000
  58. Arguments:
  59. pOutgoingMsgIterator [out] -- the new Fax Outgoing Message Iterator Object
  60. Return Value:
  61. Standard HRESULT code
  62. --*/
  63. {
  64. CComObject<CFaxOutgoingMessageIterator> *pClass;
  65. HRESULT hr = S_OK;
  66. DBG_ENTER (TEXT("CFaxOutgoingMessageIterator::Create"), hr);
  67. hr = CComObject<CFaxOutgoingMessageIterator>::CreateInstance(&pClass);
  68. if (FAILED(hr))
  69. {
  70. //
  71. // Failed to create Instance
  72. //
  73. CALL_FAIL(GENERAL_ERR, _T("CComObject<CFaxOutgoingMessageIterator>::CreateInstance()"), hr);
  74. return hr;
  75. }
  76. hr = pClass->QueryInterface(__uuidof(IFaxOutgoingMessageIterator), (void **) pOutgoingMsgIterator);
  77. if (FAILED(hr))
  78. {
  79. //
  80. // Failed to Query Fax Outgoing Message Iterator Interface
  81. //
  82. CALL_FAIL(GENERAL_ERR, _T("QueryInterface()"), hr);
  83. return hr;
  84. }
  85. return hr;
  86. } // CFaxOutgoingMessageIterator::Create()