Source code of Windows XP (NT5)
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.

58 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 2000 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 "stdinc.h"
  17. #include "FileStream.h"
  18. #include "SmartRef.h"
  19. class CPrecompiledManifestWriterStream : public CReferenceCountedFileStream
  20. //class CPrecompiledManifestWriterStream : public CFileStreamBase // not delete
  21. {
  22. private:
  23. typedef CReferenceCountedFileStream Base;
  24. //typedef CFileStreamBase Base;
  25. public:
  26. CPrecompiledManifestWriterStream() : Base(), m_fBuffer(TRUE) { }
  27. ~CPrecompiledManifestWriterStream() {}
  28. HRESULT WriteWithDelay(void const *pv, ULONG cb, ULONG *pcbWritten);
  29. // NTRAID#NTBUG9-164736-2000/8/17-a-JayK openOrCreate should probably default
  30. // default to safer CREATE_NEW but I'm preserving existing behavior where
  31. // it doesn't hurt me.
  32. BOOL SetSink(const CBaseStringBuffer &rbuff, DWORD openOrCreate = CREATE_ALWAYS);
  33. HRESULT Close(ULONG, DWORD); //besides close, rewrite MaxNodeCount, RecordCount into the header of the file
  34. BOOL IsSinkedStream(void);
  35. protected:
  36. CByteBuffer m_buffer;
  37. BOOL m_fBuffer;
  38. private:
  39. CPrecompiledManifestWriterStream(const CPrecompiledManifestWriterStream &);
  40. void operator =(const CPrecompiledManifestWriterStream &);
  41. };
  42. #endif