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.

57 lines
1.6 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. CPrecompiledManifestWriterStream.h
  5. Abstract:
  6. Like a CFileStream (its base) but also implements Commit over
  7. associated PCMWriter. This functionality was
  8. moved out of CFileStream.
  9. Author:
  10. Xiaoyu Wu (xiaoyuw) June 2000
  11. Revision History:
  12. --*/
  13. #if !defined(_FUSION_SXS_PCMWriterStream_H_INCLUDED_)
  14. #define _FUSION_SXS_PCMWriterStream_H_INCLUDED_
  15. #pragma once
  16. #include "filestream.h"
  17. #include "smartref.h"
  18. class CPrecompiledManifestWriterStream : public CReferenceCountedFileStream
  19. //class CPrecompiledManifestWriterStream : public CFileStreamBase // not delete
  20. {
  21. private:
  22. typedef CReferenceCountedFileStream Base;
  23. //typedef CFileStreamBase Base;
  24. public:
  25. CPrecompiledManifestWriterStream() : Base(), m_fBuffer(TRUE) { }
  26. ~CPrecompiledManifestWriterStream() {}
  27. HRESULT WriteWithDelay(void const *pv, ULONG cb, ULONG *pcbWritten);
  28. // NTRAID#NTBUG9-164736-2000/8/17-a-JayK,JayKrell openOrCreate should probably default
  29. // default to safer CREATE_NEW but I'm preserving existing behavior where
  30. // it doesn't hurt me.
  31. BOOL SetSink(const CBaseStringBuffer &rbuff, DWORD openOrCreate = CREATE_ALWAYS);
  32. HRESULT Close(ULONG, DWORD); //besides close, rewrite MaxNodeCount, RecordCount into the header of the file
  33. BOOL IsSinkedStream(void);
  34. protected:
  35. CByteBuffer m_buffer;
  36. BOOL m_fBuffer;
  37. private:
  38. CPrecompiledManifestWriterStream(const CPrecompiledManifestWriterStream &);
  39. void operator =(const CPrecompiledManifestWriterStream &);
  40. };
  41. #endif