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.

103 lines
1.8 KiB

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