Buffer.h
资源名称:smpplib.zip [点击查看]
上传用户:hkcoast
上传日期:2007-01-12
资源大小:979k
文件大小:1k
源码类别:
手机短信编程
开发平台:
Visual C++
- // Buffer.h: interface for the CBuffer class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_)
- #define AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- class CBuffer
- {
- // Attributes
- protected:
- PBYTE m_pBase;
- UINT m_nPtrSize;
- UINT m_nSize;
- bool m_bSustainSize;
- DWORD m_dwPageSize;
- // Methods
- protected:
- UINT DeAllocateBuffer(UINT nRequestedSize);
- UINT GetMemSize();
- public:
- void ClearBuffer();
- void Initialize(UINT nInitsize, bool bSustain);
- UINT Delete(UINT nSize);
- UINT Read(PBYTE pData, UINT nSize);
- BOOL Write(PBYTE pData, UINT nSize);
- BOOL Write(CString& strData);
- UINT GetBufferLen();
- int Scan(PBYTE pScan,UINT nPos);
- BOOL Insert(PBYTE pData, UINT nSize);
- BOOL Insert(CString& strData);
- UINT DeleteEnd(UINT nSize);
- void Copy(CBuffer& buffer);
- PBYTE GetBuffer(UINT nPos=0);
- CBuffer();
- virtual ~CBuffer();
- void FileWrite(const CString& strFileName);
- const CBuffer& operator=(CBuffer& buff);
- UINT ReAllocateBuffer(UINT nRequestedSize);
- };
- #endif // !defined(AFX_BUFFER_H__829F6693_AC4D_11D2_8C37_00600877E420__INCLUDED_)