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.

115 lines
2.1 KiB

  1. /*
  2. * IADVSINK.CPP
  3. * IAdviseSink for Document Objects CSite class
  4. *
  5. * Copyright (c)1995-1999 Microsoft Corporation, All Rights Reserved
  6. */
  7. #include "stdafx.h"
  8. #include <docobj.h>
  9. #include "site.h"
  10. /**
  11. Note: the m_cRef count is provided for debugging purposes only.
  12. CSite controls the destruction of the object through delete,
  13. not reference counting
  14. */
  15. /*
  16. * CImpIAdviseSink::CImpIAdviseSink
  17. * CImpIAdviseSink::~CImpIAdviseSink
  18. *
  19. * Parameters (Constructor):
  20. * pSite PCSite of the site we're in.
  21. * pUnkOuter LPUNKNOWN to which we delegate.
  22. */
  23. CImpIAdviseSink::CImpIAdviseSink( PCSite pSite, LPUNKNOWN pUnkOuter )
  24. {
  25. m_cRef = 0;
  26. m_pSite = pSite;
  27. m_pUnkOuter = pUnkOuter;
  28. }
  29. CImpIAdviseSink::~CImpIAdviseSink( void )
  30. {
  31. }
  32. /*
  33. * CImpIAdviseSink::QueryInterface
  34. * CImpIAdviseSink::AddRef
  35. * CImpIAdviseSink::Release
  36. *
  37. * Purpose:
  38. * IUnknown members for CImpIAdviseSink object.
  39. */
  40. STDMETHODIMP CImpIAdviseSink::QueryInterface( REFIID riid, void **ppv )
  41. {
  42. return m_pUnkOuter->QueryInterface( riid, ppv );
  43. }
  44. STDMETHODIMP_(ULONG) CImpIAdviseSink::AddRef( void )
  45. {
  46. ++m_cRef;
  47. return m_pUnkOuter->AddRef();
  48. }
  49. STDMETHODIMP_(ULONG) CImpIAdviseSink::Release( void )
  50. {
  51. --m_cRef;
  52. return m_pUnkOuter->Release();
  53. }
  54. /*
  55. * Unused members in CImpIAdviseSink
  56. * OnDataChange
  57. * OnViewChange
  58. * OnRename
  59. * OnSave
  60. */
  61. STDMETHODIMP_(void) CImpIAdviseSink::OnDataChange(LPFORMATETC /*pFEIn*/,
  62. LPSTGMEDIUM /*pSTM*/)
  63. {
  64. }
  65. STDMETHODIMP_(void) CImpIAdviseSink::OnViewChange(DWORD /*dwAspect*/,
  66. LONG /*lindex*/)
  67. {
  68. }
  69. STDMETHODIMP_(void) CImpIAdviseSink::OnRename( LPMONIKER /*pmk*/ )
  70. {
  71. }
  72. STDMETHODIMP_(void) CImpIAdviseSink::OnSave( void )
  73. {
  74. }
  75. /*
  76. * CImpIAdviseSink::OnClose
  77. *
  78. * Purpose:
  79. * Informs the advise sink that the OLE object has closed and is
  80. * no longer bound in any way. We use this to do a File/Close
  81. * to delete the object since we don't hold onto any.
  82. *
  83. * Parameters:
  84. * None
  85. *
  86. * Return Value:
  87. * None
  88. */
  89. STDMETHODIMP_(void) CImpIAdviseSink::OnClose( void )
  90. {
  91. }