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. FaxIncomingJob.cpp
  5. Abstract:
  6. Implementation of CFaxIncomingJob Class
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxIncomingJob.h"
  14. //
  15. //==================== INTERFACE SUPPORT ERROR INFO ========================
  16. //
  17. STDMETHODIMP CFaxIncomingJob::InterfaceSupportsErrorInfo(REFIID riid)
  18. {
  19. static const IID* arr[] =
  20. {
  21. &IID_IFaxIncomingJob
  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. CFaxIncomingJob::Create (
  35. IFaxIncomingJob **ppIncomingJob
  36. )
  37. /*++
  38. Routine name : CFaxIncomingJob::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. ppIncomingJob [out] -- the new Fax Inbound Message Instance
  45. Return Value:
  46. Standard HRESULT code
  47. --*/
  48. {
  49. CComObject<CFaxIncomingJob> *pClass;
  50. HRESULT hr = S_OK;
  51. DBG_ENTER (TEXT("CFaxIncomingJob::Create"), hr);
  52. hr = CComObject<CFaxIncomingJob>::CreateInstance(&pClass);
  53. if (FAILED(hr))
  54. {
  55. //
  56. // Failed to create Instance
  57. //
  58. CALL_FAIL(GENERAL_ERR, _T("CComObject<CFaxIncomingJob>::CreateInstance()"), hr);
  59. return hr;
  60. }
  61. hr = pClass->QueryInterface(__uuidof(IFaxIncomingJob), (void **) ppIncomingJob);
  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. } // CFaxIncomingJob::Create()