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.

79 lines
1.7 KiB

  1. /*
  2. * IPROPSINK.CPP
  3. * IPropertyNotifySink for Document Objects CSite class
  4. *
  5. * Copyright (c)1995-1999 Microsoft Corporation, All Rights Reserved
  6. */
  7. #include "stdafx.h"
  8. #include "site.h"
  9. /**
  10. Note: the m_cRef count is provided for debugging purposes only.
  11. CSite controls the destruction of the object through delete,
  12. not reference counting
  13. */
  14. /*
  15. * CImplPropertyNotifySink::CImplPropertyNotifySink
  16. * CImplPropertyNotifySink::~CImplPropertyNotifySink
  17. *
  18. * Parameters (Constructor):
  19. * pSite PCSite of the site we're in.
  20. * pUnkOuter LPUNKNOWN to which we delegate.
  21. */
  22. CImplPropertyNotifySink::CImplPropertyNotifySink( PCSite pSite, LPUNKNOWN pUnkOuter )
  23. {
  24. m_cRef = 0;
  25. m_pSite = pSite;
  26. m_pUnkOuter = pUnkOuter;
  27. }
  28. CImplPropertyNotifySink::~CImplPropertyNotifySink( void )
  29. {
  30. }
  31. /*
  32. * CImplPropertyNotifySink::QueryInterface
  33. * CImplPropertyNotifySink::AddRef
  34. * CImplPropertyNotifySink::Release
  35. *
  36. * Purpose:
  37. * IUnknown members for CImplPropertyNotifySink object.
  38. */
  39. STDMETHODIMP CImplPropertyNotifySink::QueryInterface( REFIID riid, void **ppv )
  40. {
  41. return m_pUnkOuter->QueryInterface( riid, ppv );
  42. }
  43. STDMETHODIMP_(ULONG) CImplPropertyNotifySink::AddRef( void )
  44. {
  45. ++m_cRef;
  46. return m_pUnkOuter->AddRef();
  47. }
  48. STDMETHODIMP_(ULONG) CImplPropertyNotifySink::Release( void )
  49. {
  50. --m_cRef;
  51. return m_pUnkOuter->Release();
  52. }
  53. STDMETHODIMP CImplPropertyNotifySink::OnChanged(DISPID dispid)
  54. {
  55. if (dispid == DISPID_READYSTATE)
  56. m_pSite->OnReadyStateChanged();
  57. return S_OK;
  58. }
  59. STDMETHODIMP CImplPropertyNotifySink::OnRequestEdit (DISPID /*dispid*/)
  60. {
  61. return S_OK;
  62. }