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.

69 lines
1.3 KiB

  1. #include "layoutui.hxx"
  2. STDMETHODIMP COleClientSite::QueryInterface(REFIID riid, void** ppObject)
  3. {
  4. if (riid==IID_IUnknown || riid==IID_IOleClientSite)
  5. {
  6. *ppObject=(IOleClientSite*) this;
  7. AddRef();
  8. }
  9. else
  10. {
  11. return E_NOINTERFACE;
  12. }
  13. return NO_ERROR;
  14. }
  15. STDMETHODIMP_(ULONG) COleClientSite::AddRef()
  16. {
  17. InterlockedIncrement( &_cReferences);
  18. return _cReferences;
  19. }
  20. STDMETHODIMP_(ULONG) COleClientSite::Release()
  21. {
  22. InterlockedDecrement(&_cReferences);
  23. if (_cReferences == 0)
  24. {
  25. delete this;
  26. }
  27. return _cReferences;
  28. }
  29. STDMETHODIMP COleClientSite::SaveObject( void)
  30. {
  31. return E_FAIL;
  32. }
  33. STDMETHODIMP COleClientSite::GetMoniker(
  34. /* [in] */ DWORD dwAssign,
  35. /* [in] */ DWORD dwWhichMoniker,
  36. /* [out] */ IMoniker __RPC_FAR *__RPC_FAR *ppmk)
  37. {
  38. return S_OK;
  39. }
  40. STDMETHODIMP COleClientSite::GetContainer(
  41. /* [out] */ IOleContainer __RPC_FAR *__RPC_FAR *ppContainer)
  42. {
  43. *ppContainer=NULL;
  44. return E_NOINTERFACE;
  45. }
  46. STDMETHODIMP COleClientSite::ShowObject( void)
  47. {
  48. return S_OK;
  49. }
  50. STDMETHODIMP COleClientSite::OnShowWindow(
  51. /* [in] */ BOOL fShow)
  52. {
  53. return S_OK;
  54. }
  55. STDMETHODIMP COleClientSite::RequestNewObjectLayout( void)
  56. {
  57. return E_NOTIMPL;
  58. }