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.

72 lines
1.4 KiB

  1. //+------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 2001
  5. //
  6. // File: cache.hxx
  7. //
  8. // Contents: Class Store Binding cache
  9. //
  10. // Author: AdamEd
  11. //
  12. //-------------------------------------------------------------------------
  13. class CBinding : public BindingsType, public CListItem
  14. {
  15. public:
  16. CBinding(
  17. CServerContext* pServerContext,
  18. WCHAR* wszClassStorePath,
  19. PSID pSid,
  20. IClassAccess* pClassAccess,
  21. HRESULT hrBind,
  22. HRESULT* phr);
  23. ~CBinding();
  24. BOOL
  25. Compare(
  26. CServerContext* pServerContext,
  27. WCHAR* wszClassStorePath,
  28. PSID pSid);
  29. BOOL
  30. IsExpired( FILETIME* pFileTime );
  31. };
  32. class CBindingList : public CList
  33. {
  34. public:
  35. CBindingList();
  36. ~CBindingList();
  37. void
  38. Lock();
  39. void
  40. Unlock();
  41. CBinding* Find(
  42. CServerContext* pServerContext,
  43. FILETIME* pCurrentTime,
  44. WCHAR* wszClassStorePath,
  45. PSID pSid);
  46. CBinding*
  47. AddBinding(
  48. FILETIME* pCurrentTime,
  49. CBinding* pBinding);
  50. private:
  51. void
  52. Delete( CBinding* pBinding );
  53. CRITICAL_SECTION _ListLock;
  54. DWORD _cBindings;
  55. };