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.

44 lines
493 B

  1. // Buffer.h -- Declaration for CBuffer, a shared buffer object
  2. #ifndef __BUFFER_H__
  3. #define __BUFFER_H__
  4. class CBufferRef;
  5. class CBuffer
  6. {
  7. friend class CBufferRef;
  8. public:
  9. CBuffer(UINT cbInitial = 0);
  10. ~CBuffer();
  11. private:
  12. void Resize(UINT cbRequired);
  13. BYTE *m_pb;
  14. UINT m_cb;
  15. CITCriticalSection m_cs;
  16. };
  17. class CBufferRef
  18. {
  19. public:
  20. CBufferRef(CBuffer &Buff, UINT cbRequired);
  21. ~CBufferRef();
  22. PBYTE StartAddress();
  23. private:
  24. CBuffer *m_pBuff;
  25. };
  26. #endif