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.

117 lines
4.0 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. router.h
  5. Abstract:
  6. This module contains the definition for the Server
  7. Extension Object Router class.
  8. Author:
  9. Don Dumitru (dondu@microsoft.com)
  10. Revision History:
  11. dondu 03/04/97 created
  12. --*/
  13. // router.h : Declaration of the CSEORouter
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSEORouter
  16. class ATL_NO_VTABLE CSEORouter :
  17. public CComObjectRootEx<CComMultiThreadModelNoCS>,
  18. public CComCoClass<CSEORouter, &CLSID_CSEORouter>,
  19. public ISEORouter,
  20. public IDispatchImpl<IEventLock, &IID_IEventLock, &LIBID_SEOLib>,
  21. public IMarshal
  22. {
  23. public:
  24. HRESULT FinalConstruct();
  25. void FinalRelease();
  26. DECLARE_PROTECT_FINAL_CONSTRUCT();
  27. DECLARE_REGISTRY_RESOURCEID_EX(IDR_StdAfx,
  28. L"SEORouter Class",
  29. L"SEO.SEORouter.1",
  30. L"SEO.SEORouter");
  31. DECLARE_GET_CONTROLLING_UNKNOWN();
  32. BEGIN_COM_MAP(CSEORouter)
  33. COM_INTERFACE_ENTRY(ISEORouter)
  34. COM_INTERFACE_ENTRY(IEventLock)
  35. COM_INTERFACE_ENTRY(IMarshal)
  36. END_COM_MAP()
  37. // ISEORouter
  38. public:
  39. HRESULT STDMETHODCALLTYPE get_Database(ISEODictionary **ppdictResult) {
  40. return (m_pRouter->get_Database(ppdictResult)); };
  41. HRESULT STDMETHODCALLTYPE put_Database(ISEODictionary *pdictDatabase) {
  42. return (m_pRouter->put_Database(pdictDatabase)); }
  43. HRESULT STDMETHODCALLTYPE get_Server(ISEODictionary **ppdictResult) {
  44. return (m_pRouter->get_Server(ppdictResult)); };
  45. HRESULT STDMETHODCALLTYPE put_Server(ISEODictionary *pdictServer) {
  46. return (m_pRouter->put_Server(pdictServer)); };
  47. HRESULT STDMETHODCALLTYPE get_Applications(ISEODictionary **ppdictResult) {
  48. return (m_pRouter->get_Applications(ppdictResult)); };
  49. HRESULT STDMETHODCALLTYPE GetDispatcher(REFIID iidEvent, REFIID iidDesired, IUnknown **ppUnkResult) {
  50. return (m_pRouter->GetDispatcher(iidEvent,iidDesired,ppUnkResult)); };
  51. HRESULT STDMETHODCALLTYPE GetDispatcherByCLSID(REFCLSID clsidDispatcher, REFIID iidEvent, REFIID iidDesired, IUnknown **ppUnkResult) {
  52. return (m_pRouter->GetDispatcherByCLSID(clsidDispatcher,iidEvent,iidDesired,ppUnkResult)); };
  53. // IEventLock
  54. public:
  55. HRESULT STDMETHODCALLTYPE LockRead(int iTimeoutMS) {
  56. return (m_pLock->LockRead(iTimeoutMS)); };
  57. HRESULT STDMETHODCALLTYPE UnlockRead() {
  58. return (m_pLock->UnlockRead()); };
  59. HRESULT STDMETHODCALLTYPE LockWrite(int iTimeoutMS) {
  60. return (m_pLock->LockWrite(iTimeoutMS)); };
  61. HRESULT STDMETHODCALLTYPE UnlockWrite() {
  62. return (m_pLock->UnlockWrite()); };
  63. // IMarshal
  64. public:
  65. HRESULT STDMETHODCALLTYPE GetUnmarshalClass(REFIID iid,
  66. void *pv,
  67. DWORD dwDestContext,
  68. void *pvDestContext,
  69. DWORD mshlflags,
  70. CLSID *pCid) {
  71. return (m_pMarshal->GetUnmarshalClass(iid,pv,dwDestContext,pvDestContext,mshlflags,pCid)); };
  72. HRESULT STDMETHODCALLTYPE GetMarshalSizeMax(REFIID riid,
  73. void *pv,
  74. DWORD dwDestContext,
  75. void *pvDestContext,
  76. DWORD mshlflags,
  77. ULONG *pSize) {
  78. return (m_pMarshal->GetMarshalSizeMax(riid,pv,dwDestContext,pvDestContext,mshlflags,pSize)); };
  79. HRESULT STDMETHODCALLTYPE MarshalInterface(IStream *pStm,
  80. REFIID riid,
  81. void *pv,
  82. DWORD dwDestContext,
  83. void *pvDestContext,
  84. DWORD mshlflags) {
  85. return (m_pMarshal->MarshalInterface(pStm,riid,pv,dwDestContext,pvDestContext,mshlflags)); };
  86. HRESULT STDMETHODCALLTYPE UnmarshalInterface(IStream *pStm,REFIID riid,void **ppv) {
  87. return (m_pMarshal->UnmarshalInterface(pStm,riid,ppv)); };
  88. HRESULT STDMETHODCALLTYPE ReleaseMarshalData(IStream *pStm) {
  89. return (m_pMarshal->ReleaseMarshalData(pStm)); };
  90. HRESULT STDMETHODCALLTYPE DisconnectObject(DWORD dwReserved) {
  91. return (m_pMarshal->DisconnectObject(dwReserved)); };
  92. private:
  93. CComPtr<ISEORouter> m_pRouter;
  94. CComQIPtr<IEventLock,&IID_IEventLock> m_pLock;
  95. CComQIPtr<IMarshal,&IID_IMarshal> m_pMarshal;
  96. };