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.

124 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxIncomingMessageIterator.cpp
  5. Abstract:
  6. Implementation of Incoming Message Iterator Class.
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxIncomingMessageIterator.h"
  14. #include "FaxIncomingMessage.h"
  15. //
  16. //========================== SUPPORT ERROR INFO ===============================
  17. //
  18. STDMETHODIMP
  19. CFaxIncomingMessageIterator::InterfaceSupportsErrorInfo(
  20. REFIID riid
  21. )
  22. /*++
  23. Routine name : CFaxIncomingMessageIterator::InterfaceSupportsErrorInfo
  24. Routine description:
  25. ATL's support 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_IFaxIncomingMessageIterator
  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. CFaxIncomingMessageIterator::Create (
  50. IFaxIncomingMessageIterator **pIncomingMsgIterator
  51. )
  52. /*++
  53. Routine name : CFaxIncomingMessageIterator::Create
  54. Routine description:
  55. Static function to create the Fax Incoming Message Iterator Object
  56. Author:
  57. Iv Garber (IvG), May, 2000
  58. Arguments:
  59. pIncomingMsgIterator [out] -- the new Fax Incoming Message Iterator Object
  60. Return Value:
  61. Standard HRESULT code
  62. --*/
  63. {
  64. CComObject<CFaxIncomingMessageIterator> *pClass;
  65. HRESULT hr = S_OK;
  66. DBG_ENTER (TEXT("CFaxIncomingMessageIterator::Create"), hr);
  67. hr = CComObject<CFaxIncomingMessageIterator>::CreateInstance(&pClass);
  68. if (FAILED(hr))
  69. {
  70. //
  71. // Failed to create Instance
  72. //
  73. CALL_FAIL(GENERAL_ERR, _T("CComObject<CFaxIncomingMessageIterator>::CreateInstance()"), hr);
  74. return hr;
  75. }
  76. hr = pClass->QueryInterface(__uuidof(IFaxIncomingMessageIterator), (void **) pIncomingMsgIterator);
  77. if (FAILED(hr))
  78. {
  79. //
  80. // Failed to Query Fax Incoming Message Iterator Interface
  81. //
  82. CALL_FAIL(GENERAL_ERR, _T("QueryInterface()"), hr);
  83. return hr;
  84. }
  85. return hr;
  86. } // CFaxIncomingMessageIterator::Create()