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.

63 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. seolock.h
  5. Abstract:
  6. This module contains the definition for the Server
  7. Extension Object CEventLock class.
  8. Author:
  9. Don Dumitru (dondu@microsoft.com)
  10. Revision History:
  11. dondu 03/06/97 created
  12. dondu 04/07/97 changed to IEventLock and CEventLock
  13. --*/
  14. // seolock.h : Declaration of the CEventLock
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CSEORouter
  17. class ATL_NO_VTABLE CEventLock :
  18. public CComObjectRootEx<CComMultiThreadModelNoCS>,
  19. public CComCoClass<CEventLock, &CLSID_CEventLock>,
  20. public IDispatchImpl<IEventLock, &IID_IEventLock, &LIBID_SEOLib>
  21. {
  22. public:
  23. HRESULT FinalConstruct();
  24. void FinalRelease();
  25. DECLARE_PROTECT_FINAL_CONSTRUCT();
  26. DECLARE_REGISTRY_RESOURCEID_EX(IDR_StdAfx,
  27. L"EventLock Class",
  28. L"Event.Lock.1",
  29. L"Event.Lock");
  30. DECLARE_GET_CONTROLLING_UNKNOWN();
  31. BEGIN_COM_MAP(CEventLock)
  32. COM_INTERFACE_ENTRY(IEventLock)
  33. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
  34. END_COM_MAP()
  35. // IEventLock
  36. public:
  37. HRESULT STDMETHODCALLTYPE LockRead(int iTimeoutMS);
  38. HRESULT STDMETHODCALLTYPE UnlockRead();
  39. HRESULT STDMETHODCALLTYPE LockWrite(int iTimeoutMS);
  40. HRESULT STDMETHODCALLTYPE UnlockWrite();
  41. private:
  42. CShareLockNH m_lock;
  43. CComPtr<IUnknown> m_pUnkMarshaler;
  44. };