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

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