1234567891011121314151617181920212223242526272829303132333435 |
- #include "StdAfx.h"
- #include "MemFileInputFiled.h"
- CMemFileInputFiled::CMemFileInputFiled( CString filed_name,CString filed_value,CMemFile * file ):CInputFiled(filed_name,filed_value,INPUT_FILED_FILE)
- {
- this->m_file= file;
- }
- CMemFileInputFiled::~CMemFileInputFiled(void)
- {
- m_file = NULL;
- }
- unsigned long CMemFileInputFiled::DataSize()
- {
- return m_file->GetLength();
- }
- void CMemFileInputFiled::Open()
- {
- m_file->SeekToBegin();
- }
- void CMemFileInputFiled::Close()
- {
- m_file->Close();
- }
- int CMemFileInputFiled::Read( void* buffer,int buffer_size )
- {
- return m_file->Read(buffer,buffer_size);
- }
|