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.2 KiB

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