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.

99 lines
1.7 KiB

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