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.

20 lines
475 B

  1. #include "priv.h"
  2. #include "cowsite.h"
  3. // no default implementation for now.
  4. // so far all clients do way more than this (e.g. deferred initialization)
  5. // in their SetSite's.
  6. HRESULT CObjectWithSite::SetSite(IUnknown * punkSite)
  7. {
  8. IUnknown_Set(&_punkSite, punkSite);
  9. return S_OK;
  10. }
  11. HRESULT CObjectWithSite::GetSite(REFIID riid, void **ppvSite)
  12. {
  13. if (_punkSite)
  14. return _punkSite->QueryInterface(riid, ppvSite);
  15. *ppvSite = NULL;
  16. return E_FAIL;
  17. }