Source code of Windows XP (NT5)
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.9 KiB

  1. // Program.cpp : Implementation of CProgram
  2. #include "stdafx.h"
  3. #include "Property.h"
  4. #include "Program.h"
  5. #include "ScheduleEntry.h"
  6. STDMETHODIMP CProgram::get_ScheduleEntries(IScheduleEntries **ppschedentries)
  7. {
  8. ENTER_API
  9. {
  10. ValidateOutPtr<IScheduleEntries>(ppschedentries, NULL);
  11. CObjectType *pobjtype;
  12. HRESULT hr;
  13. hr = m_pdb->get_ScheduleEntryObjectType(&pobjtype);
  14. if (FAILED(hr))
  15. return hr;
  16. CComPtr<IObjects> pobjsT;
  17. hr = m_pdb->get_ObjectsWithType(pobjtype, &pobjsT);
  18. if (FAILED(hr))
  19. return hr;
  20. CComPtr<IObjects> pobjs;
  21. hr = pobjsT->get_ItemsInverseRelatedToBy((IProgram *) this,
  22. m_pdb->ScheduleEntryPropSet::ProgramMetaPropertyType(), &pobjs);
  23. if (FAILED(hr))
  24. return hr;
  25. return pobjs->QueryInterface(__uuidof(IScheduleEntries), (void **) ppschedentries);
  26. }
  27. LEAVE_API
  28. }
  29. STDMETHODIMP CProgram::get_Title(BSTR *pbstrTitle)
  30. {
  31. ENTER_API
  32. {
  33. ValidateOut(pbstrTitle);
  34. return m_pdb->_get_Title((IProgram *) this, pbstrTitle);
  35. }
  36. LEAVE_API
  37. }
  38. STDMETHODIMP CProgram::put_Title(BSTR bstrTitle)
  39. {
  40. ENTER_API
  41. {
  42. ValidateIn(bstrTitle);
  43. return m_pdb->_put_Title((IProgram *) this, bstrTitle);
  44. }
  45. LEAVE_API
  46. }
  47. STDMETHODIMP CProgram::get_Description(BSTR *pbstrDescription)
  48. {
  49. ENTER_API
  50. {
  51. ValidateOut(pbstrDescription);
  52. return m_pdb->DescriptionPropSet::_get_OneParagraph((IProgram *) this, pbstrDescription);
  53. }
  54. LEAVE_API
  55. }
  56. STDMETHODIMP CProgram::put_Description(BSTR bstrDescription)
  57. {
  58. ENTER_API
  59. {
  60. ValidateIn(bstrDescription);
  61. return m_pdb->DescriptionPropSet::_put_OneParagraph((IProgram *) this, bstrDescription);
  62. }
  63. LEAVE_API
  64. }
  65. STDMETHODIMP CProgram::get_CopyrightDate(DATE *pdt)
  66. {
  67. ENTER_API
  68. {
  69. ValidateOut<DATE>(pdt, 0);
  70. return m_pdb->CopyrightPropSet::_get_Date((IProgram *) this, pdt);
  71. }
  72. LEAVE_API
  73. }
  74. STDMETHODIMP CProgram::put_CopyrightDate(DATE dt)
  75. {
  76. ENTER_API
  77. {
  78. return m_pdb->CopyrightPropSet::_put_Date((IProgram *) this, dt);
  79. }
  80. LEAVE_API
  81. }