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.

55 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Copyright (C) 1992, Microsoft Corporation.
  4. //
  5. // File: PhysIndex.CXX
  6. //
  7. // Contents: FAT Buffer/Index package
  8. //
  9. // Classes: CPhysBuffer -- Buffer
  10. //
  11. // History: 05-Mar-92 KyleP Created
  12. // 07-Aug-92 KyleP Kernel implementation
  13. // 21-Apr-93 BartoszM Rewrote to use memory mapped files
  14. //
  15. //----------------------------------------------------------------------------
  16. #include <pch.cxx>
  17. #pragma hdrstop
  18. #include "physidx.hxx"
  19. //+-------------------------------------------------------------------------
  20. //
  21. // Method: CPhysIndex::ReOpenStream
  22. //
  23. // Synopsis: Reopen for read-only
  24. //
  25. // History: 17-Feb-1994 KyleP Created
  26. //
  27. //--------------------------------------------------------------------------
  28. void CPhysIndex::ReOpenStream()
  29. {
  30. Win4Assert( _stream.IsNull() );
  31. PStorage::EOpenMode mode = _fWritable ? PStorage::eOpenForWrite :
  32. PStorage::eOpenForRead;
  33. _stream.Set( _storage.QueryExistingIndexStream ( _obj, mode ) );
  34. }
  35. //+-------------------------------------------------------------------------
  36. //
  37. // Method: CPhysHash::ReOpenStream
  38. //
  39. // Synopsis: Reopen for read-only
  40. //
  41. // History: 17-Feb-1994 KyleP Created
  42. //
  43. //--------------------------------------------------------------------------
  44. void CPhysHash::ReOpenStream()
  45. {
  46. Win4Assert( _stream.IsNull() );
  47. _stream.Set( _storage.QueryExistingHashStream ( _obj, PStorage::eOpenForRead ) );
  48. }