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.

98 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FaxIncomingJobs.cpp
  5. Abstract:
  6. Implementation of CFaxIncomingJobs Class.
  7. Author:
  8. Iv Garber (IvG) May, 2000
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #include "FaxComEx.h"
  13. #include "FaxIncomingJobs.h"
  14. //
  15. //==================== CREATE ========================================
  16. //
  17. HRESULT
  18. CFaxIncomingJobs::Create (
  19. IFaxIncomingJobs **ppIncomingJobs
  20. )
  21. /*++
  22. Routine name : CFaxIncomingJobs::Create
  23. Routine description:
  24. Static function to create the Fax IncomingJobs Object
  25. Author:
  26. Iv Garber (IvG), Apr, 2000
  27. Arguments:
  28. ppIncomingJobs [out] -- the new Fax IncomingJobs Object
  29. Return Value:
  30. Standard HRESULT code
  31. --*/
  32. {
  33. HRESULT hr = S_OK;
  34. DBG_ENTER (TEXT("CFaxIncomingJobs::Create"), hr);
  35. CComObject<CFaxIncomingJobs> *pClass;
  36. hr = CComObject<CFaxIncomingJobs>::CreateInstance(&pClass);
  37. if (FAILED(hr))
  38. {
  39. //
  40. // Failed to create Instance
  41. //
  42. CALL_FAIL(GENERAL_ERR, _T("CComObject<CFaxIncomingJobs>::CreateInstance()"), hr);
  43. return hr;
  44. }
  45. hr = pClass->QueryInterface(__uuidof(IFaxIncomingJobs), (void **) ppIncomingJobs);
  46. if (FAILED(hr))
  47. {
  48. //
  49. // Failed to Query Fax IncomingJobs 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 CFaxIncomingJobs::InterfaceSupportsErrorInfo(REFIID riid)
  60. {
  61. static const IID* arr[] =
  62. {
  63. &IID_IFaxIncomingJobs
  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. }