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.

75 lines
1.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: srothint.hxx
  7. //
  8. // Contents: Classes used in implementing the ROT hint table.
  9. //
  10. // Functions:
  11. //
  12. // History: 20-Jan-95 Ricksa Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef __SROTHINT_HXX__
  16. #define __SROTHINT_HXX__
  17. //+-------------------------------------------------------------------------
  18. //
  19. // Class: CScmRotHintTable (srht)
  20. //
  21. // Purpose: abstract SCM side of the hint table
  22. //
  23. // Interface: InitOK - whether initialization succeeded.
  24. //
  25. // History: 20-Jan-95 Ricksa Created
  26. //
  27. // Notes:
  28. //
  29. //--------------------------------------------------------------------------
  30. class CScmRotHintTable : public CRotHintTable
  31. {
  32. public:
  33. CScmRotHintTable(WCHAR *pwszName);
  34. ~CScmRotHintTable(void);
  35. BOOL InitOK(void);
  36. private:
  37. HANDLE _hSm;
  38. };
  39. //+-------------------------------------------------------------------------
  40. //
  41. // Member: CScmRotHintTable::~CScmRotHintTable
  42. //
  43. // Synopsis: Clean up hint table object
  44. //
  45. // History: 20-Jan-95 Ricksa Created
  46. //
  47. //--------------------------------------------------------------------------
  48. inline CScmRotHintTable::~CScmRotHintTable(void)
  49. {
  50. CloseSharedFileMapping(_hSm, _pbHintArray);
  51. }
  52. //+-------------------------------------------------------------------------
  53. //
  54. // Member: CScmRotHintTable::InitOK
  55. //
  56. // Synopsis: Whether initialization worked
  57. //
  58. // History: 20-Jan-95 Ricksa Created
  59. //
  60. //--------------------------------------------------------------------------
  61. inline BOOL CScmRotHintTable::InitOK(void)
  62. {
  63. return _hSm != NULL;
  64. }
  65. #endif // __ROTHINT_HXX__