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.

45 lines
1.4 KiB

  1. //***************************************************************************
  2. //
  3. // (c) 1999-2001 by Microsoft Corp. All Rights Reserved.
  4. //
  5. // seqstream.h
  6. //
  7. // cvadai 6-May-1999 created.
  8. //
  9. //***************************************************************************
  10. #ifndef __SEQSTREAM_H_
  11. #define __SEQSTREAM_H_
  12. class CSeqStream : public ISequentialStream
  13. {
  14. public:
  15. //Constructors
  16. CSeqStream();
  17. virtual ~CSeqStream();
  18. virtual BOOL Seek(ULONG iPos);
  19. virtual BOOL Clear();
  20. virtual BOOL CompareData(void* pBuffer);
  21. virtual ULONG Length() { return m_cBufSize; };
  22. virtual operator void* const() { return m_pBuffer; };
  23. STDMETHODIMP_(ULONG) AddRef(void);
  24. STDMETHODIMP_(ULONG) Release(void);
  25. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  26. STDMETHODIMP Read(
  27. /* [out] */ void __RPC_FAR *pv,
  28. /* [in] */ ULONG cb,
  29. /* [out] */ ULONG __RPC_FAR *pcbRead);
  30. STDMETHODIMP Write(
  31. /* [in] */ const void __RPC_FAR *pv,
  32. /* [in] */ ULONG cb,
  33. /* [out]*/ ULONG __RPC_FAR *pcbWritten);
  34. protected:
  35. //Data
  36. private:
  37. ULONG m_cRef; // reference count
  38. void* m_pBuffer; // buffer
  39. ULONG m_cBufSize; // buffer size
  40. ULONG m_iPos; // current index position in the buffer
  41. };
  42. #endif